Skip to content

Instantly share code, notes, and snippets.

@ganigithub
Last active June 21, 2022 06:25
Show Gist options
  • Save ganigithub/6cc5651f41fd0ac02a181cb4ec11020b to your computer and use it in GitHub Desktop.
Save ganigithub/6cc5651f41fd0ac02a181cb4ec11020b to your computer and use it in GitHub Desktop.
#input username
user = driver.find_element_by_xpath("//input[@type = 'text']")
user.send_keys(username)
#input password
pwd = driver.find_element_by_xpath("//input[@type = 'password']")
pwd.send_keys(password)
#click on login
driver.find_element_by_xpath("//button[@type='submit']").click()
sleep(1)
#input totp
ztotp = driver.find_element_by_xpath("//input[@type = 'text']")
totp_token = TOTP(totp)
token = totp_token.now()
ztotp.send_keys(token)
#click on continue
driver.find_element_by_xpath("//button[@type = 'submit']").click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment