Skip to main content
1 of 2
Michael Durrant
  • 25.2k
  • 3
  • 41
  • 113

I recommend you switch from ImplicitlyWait to Explicitly wait for the element you want as detailed at http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp

Example:

require 'rubygems' # not required for ruby 1.9 or if you installed without gem
require 'selenium-webdriver'

driver = Selenium::WebDriver.for :firefox
driver.get "http://somedomain/url_that_delays_loading"

wait = Selenium::WebDriver::Wait.new(:timeout => 10) # seconds
begin
  element = wait.until { driver.find_element(:id => "some-dynamic-element") }
ensure
  driver.quit
end
Michael Durrant
  • 25.2k
  • 3
  • 41
  • 113