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

Method __init__

seleniumbase/core/sb_cdp.py:3550–3568  ·  view source on GitHub ↗
(self, url=None, **kwargs)

Source from the content-addressed store, hash-verified

3548
3549class Chrome(CDPMethods):
3550 def __init__(self, url=None, **kwargs):
3551 if not url:
3552 url = "about:blank"
3553 loop = asyncio.new_event_loop()
3554 kwargs["loop"] = loop
3555 driver = cdp_util.start_sync(**kwargs)
3556 page = loop.run_until_complete(driver.get(url))
3557 wait_timeout = 30.0
3558 if hasattr(sb_config, "_cdp_proxy") and sb_config._cdp_proxy:
3559 wait_timeout = 45.0
3560 try:
3561 loop.run_until_complete(
3562 asyncio.wait_for(page.wait(), timeout=wait_timeout)
3563 )
3564 except asyncio.TimeoutError:
3565 pass
3566 except Exception:
3567 pass
3568 super().__init__(loop, page, driver)

Callers

nothing calls this directly

Calls 3

wait_forMethod · 0.80
getMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected