- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest3.py
More file actions
Latest commit
42 lines (31 loc) · 1.45 KB
/
Copy pathTest3.py
File metadata and controls
42 lines (31 loc) · 1.45 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
32
33
34
35
36
37
38
39
40
41
fromseleniumimportwebdriver
importos, time
fromselenium.webdriverimportActionChains
fromselenium.webdriver.support.selectimportSelect
classsome_class:
defselect_box_behavior(self):
driver=webdriver.Chrome(executable_path=os.getcwd() +os.path.sep+"chromedriver_2.45")
driver.maximize_window()
driver.implicitly_wait(10)
#
# driver.get("https://www.facebook.com/")
# driver.back()
# driver.forward()
# driver.find_element_by_css_selector("#email").send_keys("ramnath1109@gmail.com")
# # time.sleep(2)
# driver.find_element_by_css_selector("#email").clear()
#
# Select(driver.find_element_by_id("day")).select_by_visible_text("10")
# Select(driver.find_element_by_id("month")).select_by_visible_text("Nov")
# Select(driver.find_element_by_id("year")).select_by_visible_text("1982")
# driver.find_element_by_xpath("//*[@id='u_0_9']/following::input").click()
# print("Is selected? = ", driver.find_element_by_xpath("//*[@id='u_0_9']/following::input").is_selected())
# Action chains
driver.get("https://jqueryui.com/menu/")
action=ActionChains(driver)
driver.switch_to.frame(0)
action.move_to_element(driver.find_element_by_xpath("//*[@id='ui-id-9']")).perform()
time.sleep(5)
driver.switch_to.default_content()
driver.quit()
# select_box_behavior()