MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / uc_open

Function uc_open

seleniumbase/core/browser_launcher.py:555–567  ·  view source on GitHub ↗
(driver, url)

Source from the content-addressed store, hash-verified

553
554
555def uc_open(driver, url):
556 url = shared_utils.fix_url_as_needed(url)
557 if __is_cdp_swap_needed(driver):
558 driver.cdp.get(url)
559 time.sleep(0.3)
560 return
561 if (url.startswith("http:") or url.startswith("https:")):
562 with driver:
563 script = 'window.location.href = "%s";' % url
564 js_utils.call_me_later(driver, script, 5)
565 else:
566 driver.default_get(url) # The original one
567 return None
568
569
570def uc_open_with_tab(driver, url):

Callers 1

get_local_driverFunction · 0.85

Calls 3

__is_cdp_swap_neededFunction · 0.70
getMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…