Skip to content

Commit 69f6ae8

Browse files
committed
Update CDP Mode examples
1 parent 66f60d5 commit 69f6ae8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

examples/cdp_mode/raw_mouser.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from seleniumbase import SB
2+
3+
with SB(uc=True, test=True, locale="en") as sb:
4+
url = "https://www.mouser.com/"
5+
sb.activate_cdp_mode(url)
6+
sb.sleep(5)
7+
sb.press_keys('input[name="keyword"]', "FLUKE-TC01B 25HZ")
8+
sb.click('button[type="submit"]')
9+
sb.sleep(2)
10+
print(sb.get_text("h1"))
11+
print(sb.get_text("span#spnDescription"))
12+
print(sb.get_text("td.ext-price-col"))
13+
sb.highlight("h1")
14+
sb.highlight("span#spnDescription")
15+
sb.highlight("td.ext-price-col")

0 commit comments

Comments
 (0)