Skip to content

Instantly share code, notes, and snippets.

@shomanishikawa
Created January 17, 2019 21:36
Show Gist options
  • Select an option

  • Save shomanishikawa/26b9338904938039c101c18d1b04a01d to your computer and use it in GitHub Desktop.

Select an option

Save shomanishikawa/26b9338904938039c101c18d1b04a01d to your computer and use it in GitHub Desktop.
try:
selenium.find_element_by_css_selector(FUNCTIONS_MODULE_SELECTOR))
except NoSuchElementException:
# CODE HERE IF ELEMENT DOES NOT EXIST
else:
# CODE HERE IF ELEMENT EXISTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment