Guest User

Untitled

a guest
Jul 23rd, 2021
101
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import time
  2. from selenium import webdriver
  3. from urllib3.packages.six import b
  4.  
  5. browser = webdriver.Firefox()
  6.  
  7. a = open("base.txt","r")
  8. file = [s.rstrip()for s in a.readlines()]
  9. passwn = "miha1999A"
  10. for lines in file:
  11. browser.get('https://mail.ru/')
  12. base = lines.split(":")
  13. login_xpath = '/html/body/main/div[2]/div[1]/div[1]/div[2]/form[1]/div[1]/div[2]/input'
  14. browser.find_element_by_xpath(login_xpath).send_keys(base[0])
  15.  
  16. xpath1 = '/html/body/main/div[2]/div[1]/div[1]/div[2]/form[1]/button[1]'
  17. browser.find_element_by_xpath(xpath1).click()
  18.  
  19. pass_xpath = '/html/body/main/div[2]/div[1]/div[1]/div[2]/form[1]/div[2]/input'
  20. browser.find_element_by_xpath(pass_xpath).send_keys(base[1])
  21.  
  22. xpath2 = '/html/body/main/div[2]/div[1]/div[1]/div[2]/form[1]/button[2]'
  23. browser.find_element_by_xpath(xpath2).click()
  24.  
  25. time.sleep(2)
  26.  
  27. xpath5 = "//*[@name='password']"
  28. browser.find_element_by_xpath(xpath5).send_keys(passwn)
  29.  
  30. time.sleep(2)
  31.  
  32. xpath6 = "//*[@name='repeat-password']"
  33. browser.find_element_by_xpath(xpath6).send_keys(passwn)
  34.  
  35. time.sleep(1)
  36.  
  37. browser.find_element_by_tag_name('button').click()
RAW Paste Data