Skip to content

Commit ba3858a

Browse files
committed
Add a CDP Mode example
1 parent c473c3e commit ba3858a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from seleniumbase import sb_cdp
2+
3+
url = "https://pixelscan.net/fingerprint-check"
4+
sb = sb_cdp.Chrome(url, incognito=True)
5+
sb.remove_element("#headerBanner")
6+
sb.wait_for_element("pxlscn-dynamic-ad")
7+
sb.sleep(0.5)
8+
sb.remove_elements("pxlscn-dynamic-ad")
9+
sb.sleep(2)
10+
sb.assert_text("No masking detected", "pxlscn-fingerprint-masking")
11+
sb.assert_text("No automated behavior", "pxlscn-bot-detection")
12+
sb.highlight('span:contains("is consistent")')
13+
sb.sleep(1)
14+
sb.highlight("pxlscn-fingerprint-masking p")
15+
sb.sleep(1)
16+
sb.highlight("pxlscn-bot-detection p")
17+
sb.sleep(2)

0 commit comments

Comments
 (0)