-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexercise3.py
More file actions
65 lines (24 loc) · 1.26 KB
/
exercise3.py
File metadata and controls
65 lines (24 loc) · 1.26 KB
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
# from selenium import webdriver
# from selenium.webdriver.common.by import By
# import time
# from selenium.webdriver.common.keys import Keys
# driver = webdriver.Chrome()
# driver.maximize_window()
# driver.implicitly_wait(5)
# driver.get("https://demoqa.com/checkbox")
# home_plus = driver.find_element(By.CLASS_NAME, "rc-tree-switcher_close")
# home_plus.click()
# documents_plus = driver.find_element(By.XPATH, "/html/body/div/div/div/div/div[2]/div[1]/div/div[3]/div/div/div/div[3]/span[2]")
# documents_plus.click()
# office_plus = driver.find_element(By.XPATH, "/html/body/div/div/div/div/div[2]/div[1]/div/div[3]/div/div/div/div[5]/span[2]")
# office_plus.click()
# select_classified_checkbox = driver.find_element(By.XPATH, "/html/body/div/div/div/div/div[2]/div[1]/div/div[3]/div/div/div/div[8]/span[3]")
# select_classified_checkbox.click()
# select_general_checkbox = driver.find_element(By.XPATH, "/html/body/div/div/div/div/div[2]/div[1]/div/div[3]/div/div/div/div[9]/span[3]")
# select_general_checkbox.click()
# print("Opened Home, Documents, and Office folders successfully!")
# print("Checked Classified checkbox")
# print("Checked General checkbox")
# driver.save_screenshot("checkbox_screenshot.png")
# time.sleep(2)
# driver.quit()