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

Function main

examples/cdp_mode/playwright/raw_basic_async.py:6–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6async def main():
7 driver = await cdp_driver.start_async()
8 endpoint_url = driver.get_endpoint_url()
9
10 async with async_playwright() as p:
11 browser = await p.chromium.connect_over_cdp(endpoint_url)
12 page = browser.contexts[0].pages[0]
13 await page.goto("https://seleniumbase.io/simple/login")
14 await page.fill("#username", "demo_user")
15 await page.fill("#password", "secret_pass")
16 await page.click("#log-in")
17 await page.wait_for_selector("h1")
18 await page.wait_for_timeout(1000)
19
20
21if __name__ == "__main__":

Callers 1

raw_basic_async.pyFile · 0.70

Calls 5

fillMethod · 0.80
get_endpoint_urlMethod · 0.45
gotoMethod · 0.45
clickMethod · 0.45
wait_for_selectorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…