-
Notifications
You must be signed in to change notification settings - Fork 2
/
ycRepeatPage-Cas.py
37 lines (25 loc) · 992 Bytes
/
ycRepeatPage-Cas.py
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
27
28
29
30
31
32
33
34
35
36
37
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Chrome('./chromedriver')
driver.get("https://epic.youngcapital.nl/contact")
# time.sleep(0.5)
total = 0
for i in range(100):
driver.get("https://epic.youngcapital.nl/contact")
name = driver.find_element_by_xpath('//*[@id="contact_reaction_name"]')
name.clear()
name.send_keys('test' + str(total))
email = driver.find_element_by_xpath('//*[@id="contact_reaction_email"]')
email.clear()
email.send_keys('test' + str(total) + '@test.com')
onderwerp = driver.find_element_by_xpath('//*[@id="contact_reaction_subject"]')
onderwerp.clear()
onderwerp.send_keys('Test' + str(total))
bericht = driver.find_element_by_xpath('//*[@id="contact_reaction_body"]')
bericht.clear()
bericht.send_keys('Lorem ipsum dolor sit amet, consectetur adipiscing elit')
bericht.submit()
total = total + 1
print(total)
driver.close()