Skip to content

Instantly share code, notes, and snippets.

@jarib
Created July 5, 2011 20:56
Show Gist options
  • Save jarib/1065906 to your computer and use it in GitHub Desktop.
Save jarib/1065906 to your computer and use it in GitHub Desktop.
def element_present?(how, what)
@driver.find_element(how, what)
true
rescue Selenium::WebDriver::Error::NoSuchElementError
false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment