Skip to content

Instantly share code, notes, and snippets.

@AnasAlmasri
Created May 9, 2020 17:35
Show Gist options
  • Save AnasAlmasri/9b2af976c27deebec8937bbdd3cf66a4 to your computer and use it in GitHub Desktop.
Save AnasAlmasri/9b2af976c27deebec8937bbdd3cf66a4 to your computer and use it in GitHub Desktop.
# fill out login form
username = WebDriverWait(driver, 10).until(lambda driver: driver.find_element_by_xpath('//*[@id="username_or_email"]'))
password = WebDriverWait(driver, 10).until(lambda driver: driver.find_element_by_xpath('//*[@id="password"]'))
login = WebDriverWait(driver, 10).until(lambda driver: driver.find_element_by_xpath('//*[@id="allow"]'))
time.sleep(sleep_duration)
username.clear()
username.send_keys(email_cred)
time.sleep(nap_duration)
password.clear()
password.send_keys(pass_cred)
time.sleep(nap_duration)
login.click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment