Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
File renamed without changes.

‎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)

AltStyle によって変換されたページ (->オリジナル) /