Waiting for pop-up window to load in Firefox

F

fabulich

(Forgive my cross-posting; there seem to be a number of active
JavaScript newsgroups and I'm not sure to which I need to post.)

I am having a terrible time using JavaScript to detect when a pop-up
window has finished loading.

I'm working with Selenium, a pure-JavaScript automated testing
framework. http://selenium.openqa.org

Normally, to determine when a window is done loading, I'd use an event
listener (e.g. I'd listen for the onLoad event, or the DOMContentLoaded
event, or the pageShow event, or whatever).

But in this case, I don't control the HTML of the window; when I try to
attach a listener for these "early" events, I find that I attach too
late (after the page has loaded) and my listeners never get called.

On IE, Konqueror, Safari and Opera I can just poll the
document.readyState property to see if the page is done loading, but
this attribute isn't available under Mozilla/Firefox, so I seem to be
totally stuck. I can't wait for an event, because I might have missed
it, and I have no way to check to see if I missed it.

Does anyone have any suggestions about how to handle this?

-Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top