4

I wanted to know, how I can use following waits in program at which situations?

 1. driver.manage.timeouts.implicit_wait = 20
 2. driver.manage.timeouts.script_timeout = 20
 3. driver.manage.timeouts.page_load = 20

My program error is:

click to calendar. Waiting for book appointment pop-up.
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.52.0/lib/selenium/webdriver/common/wait.rb:76:in `until': timed out after 10 seconds (Unable to locate element: {"method":"xpath","selector":".//*[@id='calendar']//*[contains(@class, 'fc-slot4')]/td/div"}) (Selenium::WebDriver::Error::TimeOutError)
        from anonymouspatient.rb:61:in `<main>'

I can locate this element using IRB commands but can't find an element in selenium Webdriver using Ruby.

  • You'll want to modify your function to rescue the Selenium::WebDriver::Error::TimeOutError exception. Your code isn't failing to find the element, it's failing to find the element in time. Can you share some code so we can help you modify it? – alex May 29 '19 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.