Skip to content

Instantly share code, notes, and snippets.

@SalmonMode
Created May 16, 2019 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SalmonMode/1df3a99ffd3107f73a3e08278c4e9965 to your computer and use it in GitHub Desktop.
Save SalmonMode/1df3a99ffd3107f73a3e08278c4e9965 to your computer and use it in GitHub Desktop.
form = driver.find_element(By.ID, "my-form")
wrapper_div = form.find_element(By.XPATH, "div[.//input[@id='firstname']]")
my_label = wrapper_div.find_element(By.TAG_NAME, "label")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment