Skip to content

Commit b9d5fc2

Browse files
committed
Fix an issue with double-clicking on Windows
1 parent bee443a commit b9d5fc2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,18 +209,14 @@ def double_click(self, selector, by=By.CSS_SELECTOR, timeout=None):
209209
pre_action_url = self.driver.current_url
210210
try:
211211
actions = ActionChains(self.driver)
212-
actions.move_to_element(element)
213-
actions.double_click(element)
214-
actions.perform()
212+
actions.double_click(element).perform()
215213
except (StaleElementReferenceException, ENI_Exception):
216214
self.wait_for_ready_state_complete()
217215
time.sleep(0.05)
218216
element = page_actions.wait_for_element_visible(
219217
self.driver, selector, by, timeout=timeout)
220218
actions = ActionChains(self.driver)
221-
actions.move_to_element(element)
222-
actions.double_click(element)
223-
actions.perform()
219+
actions.double_click(element).perform()
224220
if settings.WAIT_FOR_RSC_ON_CLICKS:
225221
self.wait_for_ready_state_complete()
226222
if self.demo_mode:

0 commit comments

Comments
 (0)