· 9 years ago · Aug 31, 2016, 02:02 PM
1from selenium import webdriver
2import random
3
4
5words = ["sex", "pain", "anonimus","love","anglomania","fuck","this","world","for","say","hi",
6 "to",
7 "Joe",
8 "bdsmmurder" ,
9 'Email',
10 'SSN',
11 'Address',
12 'Home Phone',
13 'Mobile Phone',
14 'DOB',
15 'DateofSurgery',
16 'DateofService',
17 'FacilityofService',
18 'ClinicNumber:',
19 'Employer',
20 'Work Phone',
21 'Fax',
22 'Type',
23 'IPA',
24 'Health Plan',
25 'ID',
26 'Claims Address',
27 'Group',
28 'Claim',
29 'Phone',
30 'Fax',
31 'Contact',
32 'AdjusterEmail',
33 'UtilReviewPhone',
34 'UtilReviewFax',
35 'Doctor',
36 'NPI',
37 'DateofInjury',
38 'BodyParts',
39 'BodyPartide',
40 'Gender',
41 'Diagnosis',
42 'Diagnosis',
43 'Procedure']
44domains = ["gmail.com","ya.ru","mail.ru","yahoo.com","openslave.com","yandex.ru","hotmail.com","hotmail.com", "gmail.com", "aol.com", "mail.com" , "mail.kz", "yahoo.com"]
45
46driver = webdriver.Firefox()
47r = 0
48
49driver.get("https://mail.rambler.ru/")
50
51
52
53e_mail = driver.find_element_by_xpath(".//*[@id='app']/div/div[1]/div[2]/form/div[1]/div[1]/input")
54e_mail.send_keys("retestqa")
55pas = driver.find_element_by_xpath(".//*[@id='form_password']")
56pas.send_keys("112313")
57pas.submit()
58for i in range (0,1000):
59
60 random_word = words[random.randint(0,len(words)-1)]
61 random_domain = domains[random.randint(0,len(domains)-1)]
62 result = random_word+"@"+random_domain
63
64 new_mail = driver.find_element_by_xpath(".//*[@id='js']/body/div[6]/div[1]/div[1]/button[1]")
65 new_mail.click()
66
67 adress = driver.find_element_by_xpath(".//*[@id='js']/body/div[6]/div[2]/div[3]/div[1]/div[2]/div/label/input")
68 adress.send_keys("roboapp@rambler.ru")
69 driver.find_element_by_xpath(".//*[@id='js']/body/div[6]/div[2]/div[3]/div[1]/div[2]/div/div/div[1]/div").click()
70 driver.find_element_by_xpath(".//*[@id='js']/body/div[6]/div[2]/div[3]/div[1]/div[2]/div/label/b").click()
71
72
73 driver.find_element_by_xpath(".//*[@id='js']/body/div[6]/div[2]/div[3]/div[1]/div[5]/div").click()
74 search_email = driver.find_element_by_xpath(".//*[@id='subject']")
75 search_email.send_keys(result)
76
77
78 send = driver.find_element_by_xpath(".//*[@id='js']/body/div[6]/div[1]/div[4]/button[2]")
79 send.click()