-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgmail-log.py
More file actions
26 lines (26 loc) · 781 Bytes
/
gmail-log.py
File metadata and controls
26 lines (26 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from selenium import webdriver
# create a new Firefox session
driver = webdriver.Chrome()
driver.implicitly_wait(30)
driver.maximize_window()
url="http://google.com"
web=driver.get(url)
kli2=driver.find_element_by_id('gb_70')
kli2.click()
kli3=driver.find_element_by_xpath('//*[@id="identifierId"]')
print('input user')
user=input()
kli3.send_keys(user)
driver.implicitly_wait(5)
kli4=driver.find_element_by_xpath('/html/body/div[1]/div[1]/div[2]/div/div[2]/div/div/div[2]/div/div[2]/div/div[1]/div/div/button')
kli4.click()
driver.implicitly_wait(5)
kli5=driver.find_element_by_name('password')
print('input pass')
pass=input()
kli5.send_keys(pass)
kli6=driver.find_element_by_xpath('//*[@id="passwordNext"]/div/button')
kli6.click()
if 1:
print ('all is good')
driver.quit()