Issue: Our website is very slow in loading a page after you enter a user id and password. To counteract this, I tried to enter a "Sleep" statement, in addition to a wait_until_present method. The webpage loads usually after about 70 seconds, but I get a timeout after 60 seconds. Why would this occur if I have a 90 second sleep statement in addition to the default 60 seconds for "wait_until_present"?
Code in RB File:
Enter User ID and Password
@browser.driver.find_element(id: "ctl00_ContentPlaceHolder1_Wizard1_txtUserName").send_keys ""
@browser.driver.find_element(name: "ctl00$$Wizard1$StartNavigationTemplateContainerID$btnNext").click
@browser.driver.find_element(id: "ctl00_ContentPlaceHolder1_Wizard1_txtPassword").send_keys ""
@browser.driver.find_element(name: "ctl00$$Wizard1$StepNavigationTemplateContainerID$btnNext").click
Wait until page loads
sleep(90)
@browser.b(:text => "You are now viewing info for 1st Global House").wait_until_present
Error:
C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:146:in
rescue in rbuf_fill': Timeout::Error ( imeout::Error) from C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:140:in
rbuf_fill' from C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:122:inreaduntil' from C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:132:in
readline' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:2563:inread_status_line' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:2552:in
read_new' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1320:inblock in transport_request' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1317:in
catch' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1317:intransport_request' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1294:in
request' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1287:inblock in request' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:746:in
start' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1285:inrequest' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/ ebdriver/remote/http/default.rb:83:in
response_for' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/ ebdriver/remote/http/default.rb:39:inrequest' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/ ebdriver/remote/http/common.rb:40:in
call' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/ ebdriver/remote/bridge.rb:640:inraw_execute' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/ ebdriver/remote/bridge.rb:618:in
execute' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/ ebdriver/remote/bridge.rb:375:inclickElement' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/ ebdriver/common/element.rb:54:in
click' from createaccount.rb:40:in `'