回答編集履歴
2
修正
test
CHANGED
@@ -62,7 +62,7 @@
|
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
-
driver = webdriver.Chrome("Pa
|
65
|
+
driver = webdriver.Chrome("Path to chromedriver.exe")
|
66
66
|
|
67
67
|
driver.get('https://jqueryui.com/slider/')
|
68
68
|
|
1
追記
test
CHANGED
@@ -43,3 +43,55 @@
|
|
43
43
|
[https://www.seleniumqref.com/api/python/actions/Python_click_and_hold_move_by_offset.html](https://www.seleniumqref.com/api/python/actions/Python_click_and_hold_move_by_offset.html)
|
44
44
|
|
45
45
|
[https://jqueryui.com/slider/](https://jqueryui.com/slider/)
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
テスト
|
52
|
+
|
53
|
+
```Python
|
54
|
+
|
55
|
+
from selenium import webdriver
|
56
|
+
|
57
|
+
from selenium.webdriver.common.action_chains import ActionChains
|
58
|
+
|
59
|
+
from time import sleep
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
driver = webdriver.Chrome("Pass to chromedriver.exe")
|
66
|
+
|
67
|
+
driver.get('https://jqueryui.com/slider/')
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
driver.implicitly_wait(10)
|
72
|
+
|
73
|
+
driver.maximize_window()
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
driver.switch_to.frame(0)
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
element = driver.find_element_by_id("slider")
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
sleep(3)
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
actions = ActionChains(driver)
|
90
|
+
|
91
|
+
actions.click_and_hold(element)
|
92
|
+
|
93
|
+
actions.move_by_offset(100,0)
|
94
|
+
|
95
|
+
actions.perform()
|
96
|
+
|
97
|
+
```
|