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

Function main

examples/cdp_mode/raw_cdp_login.py:5–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def main():
6 sb = sb_cdp.Chrome()
7 sb.goto("https://seleniumbase.io/simple/login")
8 sb.type("#username", "demo_user")
9 sb.type("#password", "secret_pass")
10 sb.click('a:contains("Sign in")')
11 sb.assert_exact_text("Welcome!", "h1")
12 sb.assert_element("img#image1")
13 sb.highlight("#image1")
14 top_nav = sb.find_element("div.topnav")
15 links = top_nav.query_selector_all("a")
16 for nav_item in links:
17 print(nav_item.text)
18 sb.click_link("Sign out")
19 sb.assert_text("signed out", "#top_message")
20 sb.quit()
21
22
23if __name__ == "__main__":

Callers 1

raw_cdp_login.pyFile · 0.70

Calls 11

quitMethod · 0.95
query_selector_allMethod · 0.80
gotoMethod · 0.45
typeMethod · 0.45
clickMethod · 0.45
assert_exact_textMethod · 0.45
assert_elementMethod · 0.45
highlightMethod · 0.45
find_elementMethod · 0.45
click_linkMethod · 0.45
assert_textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…