본문 바로가기
Python

[셀레니움] 구글 자동로그인

by 퍼포먼스마케팅코더 2017. 1. 25.
반응형

#구글 자동 로그인
driver = webdriver.Firefox()
driver.get('https://accounts.google.com/)
time.sleep(1)
username = driver.find_element_by_id("Email")
username.send_keys('userid')
nextbtn = driver.find_element_by_id("next")
nextbtn.submit()
time.sleep(1)
password = driver.find_element_by_id("password")
password.send_keys('password')
time.sleep(1)
submitbtn = driver.find_element_by_id("submit")
submitbtn.click()
time.sleep(1)

반응형

댓글