回答編集履歴
1
説明の修正
answer
CHANGED
@@ -18,18 +18,17 @@
|
|
18
18
|
|
19
19
|
# 1回目
|
20
20
|
actions = ActionChains(driver)
|
21
|
-
actions.reset_actions()
|
22
21
|
actions.move_to_element(target_list).perform()
|
23
22
|
driver.find_element_by_xpath("XXXX").click() # 任意のメニューを選択
|
24
23
|
driver.find_element_by_xpath("XXXX").click() # 表示された画面を閉じる
|
25
24
|
|
26
25
|
# 2回目
|
27
26
|
actions = ActionChains(driver)
|
28
|
-
actions.reset_actions()
|
27
|
+
actions.reset_actions() # キューに溜められたアクションを解放
|
29
28
|
actions.move_to_element(target_list).perform()
|
30
29
|
driver.find_element_by_xpath("XXXX").click() # 任意のメニューを選択
|
31
30
|
driver.find_element_by_xpath("XXXX").click() # 表示された画面を閉じる
|
32
31
|
```
|
33
32
|
|
34
|
-
※ 1回目の実行前のリセットは
|
33
|
+
※ 1回目の実行前のリセットは必要ありません。
|
35
34
|
※ 各実行ごとにインスタンスの生成(actions = ActionChains())を入れないとエラーとなります。
|