Skip to content

Commit e25d73f

Browse files
committed
Update timing
1 parent 59efc8f commit e25d73f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ def uc_special_open_if_cf(driver, url, proxy_string=None):
218218
pass
219219
if special:
220220
with driver:
221-
time.sleep(0.2)
221+
time.sleep(0.18)
222222
driver.execute_script('window.open("%s","_blank");' % url)
223223
driver.close()
224224
driver.switch_to.window(driver.window_handles[-1])
225-
time.sleep(0.2)
225+
time.sleep(0.02)
226226
else:
227227
driver.open(url) # The original one
228228
else:
@@ -233,9 +233,9 @@ def uc_special_open_if_cf(driver, url, proxy_string=None):
233233
def uc_open(driver, url):
234234
if (url.startswith("http:") or url.startswith("https:")):
235235
with driver:
236-
time.sleep(0.2)
236+
time.sleep(0.18)
237237
driver.open(url)
238-
time.sleep(0.2)
238+
time.sleep(0.02)
239239
else:
240240
driver.open(url) # The original one
241241
return None
@@ -244,11 +244,11 @@ def uc_open(driver, url):
244244
def uc_open_with_tab(driver, url):
245245
if (url.startswith("http:") or url.startswith("https:")):
246246
with driver:
247-
time.sleep(0.2)
247+
time.sleep(0.18)
248248
driver.execute_script('window.open("%s","_blank");' % url)
249249
driver.close()
250250
driver.switch_to.window(driver.window_handles[-1])
251-
time.sleep(0.2)
251+
time.sleep(0.02)
252252
else:
253253
driver.open(url) # The original one
254254
return None

seleniumbase/fixtures/base_case.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3120,6 +3120,7 @@ def load_html_string(self, html_string, new_page=True):
31203120
self.execute_script('''%s = \"%s\"''' % (inner_body, html_body))
31213121
elif found_body and found_head:
31223122
self.execute_script('''%s = \"%s\"''' % (inner_head, html_head))
3123+
time.sleep(0.02)
31233124
self.execute_script('''%s = \"%s\"''' % (inner_body, html_body))
31243125
else:
31253126
raise Exception("Logic Error!")

0 commit comments

Comments
 (0)