Created
December 10, 2018 10:31
-
-
Save KobayashiTakaki/7272cf87a6a36c9a5ad1e74b06804a7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
url = "https://example.com/login/" | |
user = "username" | |
password = "password" | |
driver = webdriver.Chrome() | |
driver.implicitly_wait(3) | |
driver.get(url) | |
elem = driver.find_element_by_id("login_id") | |
elem.clear() | |
elem.send_keys(user) | |
elem = driver.find_element_by_id("login_password") | |
elem.clear() | |
elem.send_keys(password) | |
elem = driver.find_element_by_id("login_button") | |
elem.click() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment