Skip to content

Commit 722a01e

Browse files
committed
Refactoring
1 parent f3d4072 commit 722a01e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,8 @@ def double_click(self, selector, by="css selector", timeout=None):
558558
if not self.demo_mode and not self.slow_mode:
559559
self.__scroll_to_element(element, selector, by)
560560
self.wait_for_ready_state_complete()
561+
if self.__needs_minimum_wait():
562+
time.sleep(0.02)
561563
# Find the element one more time in case scrolling hid it
562564
element = page_actions.wait_for_element_visible(
563565
self.driver,
@@ -606,6 +608,8 @@ def double_click(self, selector, by="css selector", timeout=None):
606608
self.__demo_mode_pause_if_active(tiny=True)
607609
elif self.slow_mode:
608610
self.__slow_mode_pause_if_active()
611+
elif self.__needs_minimum_wait():
612+
time.sleep(0.02)
609613

610614
def click_chain(
611615
self, selectors_list, by="css selector", timeout=None, spacing=0
@@ -2914,6 +2918,8 @@ def switch_to_frame(self, frame, timeout=None):
29142918
if type(frame) is str and self.is_element_visible(frame):
29152919
try:
29162920
self.scroll_to(frame, timeout=1)
2921+
if self.__needs_minimum_wait():
2922+
time.sleep(0.01)
29172923
except Exception:
29182924
time.sleep(0.01)
29192925
else:

0 commit comments

Comments
 (0)