Skip to content

Commit 289ea85

Browse files
committed
Update default timings
1 parent 4f41154 commit 289ea85

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

seleniumbase/config/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Different methods/actions in base_case.py use different timeouts.
1313
# If the element to be acted on does not appear in time, the test fails.
1414
MINI_TIMEOUT = 2
15-
SMALL_TIMEOUT = 6
15+
SMALL_TIMEOUT = 7
1616
LARGE_TIMEOUT = 10
1717
EXTREME_TIMEOUT = 30
1818

seleniumbase/fixtures/base_case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,8 +2584,8 @@ def switch_to_frame(self, frame, timeout=None):
25842584
"""
25852585
self.__check_scope()
25862586
if not timeout:
2587-
timeout = settings.SMALL_TIMEOUT
2588-
if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
2587+
timeout = settings.LARGE_TIMEOUT
2588+
if self.timeout_multiplier and timeout == settings.LARGE_TIMEOUT:
25892589
timeout = self.__get_new_timeout(timeout)
25902590
if type(frame) is str and self.is_element_visible(frame):
25912591
try:

seleniumbase/fixtures/js_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ def raise_unable_to_load_jquery_exception(driver):
144144
)
145145
else:
146146
raise Exception(
147-
"""Unable to load jQuery on "%s" because this website """
148-
"""restricts external JavaScript resources from loading."""
147+
"""Unable to load jQuery on "%s" because this website may be """
148+
"""restricting external JavaScript resources from loading."""
149149
% driver.current_url
150150
)
151151

@@ -172,8 +172,9 @@ def activate_jquery(driver):
172172
time.sleep(0.1)
173173
try:
174174
add_js_link(driver, jquery_js)
175-
time.sleep(0.1)
175+
time.sleep(0.2)
176176
driver.execute_script("jQuery('head');")
177+
return
177178
except Exception:
178179
pass
179180
# Since jQuery still isn't activating, give up and raise an exception

0 commit comments

Comments
 (0)