[Wtr-general] Page Loading Problem
Charley Baker
charley.baker at gmail.com
Wed Jul 19 10:58:34 EDT 2006
You can turn off image loading in the ie options dialog under advanced. I'm
not aware of any other way to set Watir not to wait for ready state from the
browser.
-Charley
On 7/18/06, David Solis <dsolis at yahoo.com> wrote:
>
> I have a problem with a site taking too long to load. I'm hoping somebody
> can point in the right direction.
> The test environment in which my script runs takes a long time to load
> images. The following statement waits for the page to be loaded:
>
> $ie.text_field(:name, "username").set(casino_user)
>
> Is there a way that I can force this statement to start running without
> waiting for the page to completely load?
>
> class LoginCasino
> def initialize(casino_user, casino_password, casino_url,
> casino_submit_key, cgc_submit_key)
> $ie = Watir::IE.start(casino_url)
> if $ie.contains_text("Username:")
> $ie.goto($casino_url+"/security/logoff.do")
> end
> $ie.text_field(:name, "username").set(casino_user)
> $ie.text_field(:name, "password").set(casino_password)
> if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
> ($casino_url=~/vgfo/))
> $ie.button(:value, casino_submit_key).click
> elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
> $ie.button(:value, cgc_submit_key).click
> end
>
> #$ie.image(:src, submit_key).click()
> end
> def logout (casino_url)
> if (($casino_url=~/wpt/) || ($casino_url=~/msn/) ||
> ($casino_url=~/vgfo/))
> $ie.goto($casino_url+"/security/logoff.do")
> elsif (($casino_url=~/cqa/) || ($casino_url=~/cdev/))
> $ie.link(:text, "Log Out").click
> end
> end
>
> def shutdown
> $ie.close
> sleep 1
> end
> end
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060719/431ca445/attachment.html
More information about the Wtr-general
mailing list