Hi Experts,

I use below code to log  the application, some time application hangs
to load, that time test also gets hang and lets to fail.

    @ie1 = Watir::IE.new
    @ie1.goto $url
    @ie1.maximize

    @ie1.text_field(:name,"txtUserName").set $userid
    @ie1.text_field(:name,"txtPassword").set $password
    @ie1.button(:name,"btnSubmit").click

Just i want to alter my code like below

    @ie1 = Watir::IE.new
    @ie1.goto $url
    @ie1.maximize

timer = 0

while password field is not exist
  sleep 1
  timer+=1
if timer == 20 then
   Watir::IE.close_all()
    @ie1 = Watir::IE.new
    @ie1.goto $url
    @ie1.maximize
end
end


but i cant achieve it , it hangs in the particular @ie1.goto $url line
and wont move to the next line.

please give me a solution.

Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to