Method: Selenium::WebDriver::Driver#wait_and_click
- Defined in:
- lib/oats/oats_selenium_api.rb
#wait_and_click(locator, options = {}) ⇒ Object
Waits as in wait_for_element and then clicks on the locator If wait_for_element succeeds, returns locator, else nil
391 392 393 394 395 396 |
# File 'lib/oats/oats_selenium_api.rb', line 391 def wait_and_click(locator, = {}) # options[:extra_seconds] ||= 1 if selenium.chrome? loc = wait_for_element(locator, ) return nil unless loc click(loc) end |