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
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