-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAimTrainer.py
More file actions
38 lines (20 loc) · 823 Bytes
/
AimTrainer.py
File metadata and controls
38 lines (20 loc) · 823 Bytes
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
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
import time
websiteURL = 'https://humanbenchmark.com/tests/aim'
driverPath = '/Users/gannontubbs/Downloads/geckodriver'
driver = webdriver.Firefox()
driver.get(websiteURL)
# targetDiv = driver.find_element_by_xpath('//div[contains(@class, "css-1k4dpwl e6yfngs0")]')
count = 0
# css-q4kt6s e6yfngs1
# count < 10
startTargetDiv = driver.find_element(By.XPATH, '//div[contains(@class, "css-1k4dpwl e6yfngs0")]')
startTargetDiv.click()
while(count < 30):
targetDiv = driver.find_element(By.XPATH, '//div[contains(@class, "css-ad1j3y e6yfngs2")]')
ActionChains(driver).move_to_element(targetDiv).click().perform()
count += 1
time.sleep(30)
driver.quit()