-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
47 lines (45 loc) · 4.01 KB
/
main.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
38
39
40
41
42
43
44
45
46
47
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait as wait
import time
for i in range(60):
driver = webdriver.Chrome(executable_path = './Driver/chromedriver.exe')
driver.get("{{ url }}")
driver.find_element_by_xpath('/html/body/div/div/div[3]/div/div[1]/button').send_keys(Keys.ENTER)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[5]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[3]/div/div[2]/div/div/div/div/div/div/div/rating-question/div/div/div/div/div/div[3]/div/div/span[1]/span"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[4]/nav/div/div/div/div[1]/div/button[1]"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[4]/nav/div/div/div/div[1]/div/button[1]"))).click()
time.sleep(2)
wait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div[5]/div/span"))).click()
time.sleep(2)
driver.close()