Altin, Mattias wrote:

 In the Selenium reference under verifyAlert I found this: "NOTE:
 Selenium does NOT support javascript alerts that are generated in a
 page's onload() event handler. In this case a visible dialog WILL be
 generated and Selenium will hang until you manually click OK."

 Does anyone know of a workaround for this?

I haven't tried this myself, but I seem to recall someone getting around this by delaying the alert using window.setTimeout(), ie. instead of

   <body onload='alert("blah")'>
      ...

you'd do something like

   <body onload='window.setTimeout("handleOnload()",0)'>
       <script>
            function handleOnload() {
               alert("blah");
            }
      </script>
      ...

--
cheers, MikeW                            http://www.dogbiscuit.org/mdub/

_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to