Skip to content

Commit 4dd7cc7

Browse files
committed
Update examples
1 parent f3361b8 commit 4dd7cc7

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

examples/cdp_mode/raw_pixelscan.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
with SB(uc=True, incognito=True, test=True) as sb:
44
sb.activate_cdp_mode("https://pixelscan.net/")
55
sb.sleep(3)
6-
sb.remove_elements("div.banner") # Remove the banner
6+
sb.remove_elements(".bg-bannerBg") # Remove the top banner
7+
sb.remove_elements("pxlscn-ad1") # Remove the ad banner
78
sb.remove_elements("jdiv") # Remove chat widgets
8-
sb.cdp.scroll_down(15)
99
not_masking_text = "You are not masking your fingerprint"
1010
sb.assert_text(not_masking_text, "pxlscn-fingerprint-masking")
1111
no_automation_detected = "No automation framework detected"
1212
sb.assert_text(no_automation_detected, "pxlscn-bot-detection")
13-
sb.highlight("span.text-success", loops=8)
13+
consistent_selector = 'div.bg-consistentBg [alt="Good"]'
14+
sb.highlight(consistent_selector, loops=8)
1415
sb.sleep(1)
1516
fingerprint_masking_div = "pxlscn-fingerprint-masking div"
1617
sb.highlight(fingerprint_masking_div, loops=9)
1718
sb.sleep(1)
18-
sb.highlight(".bot-detection-context", loops=10)
19+
sb.highlight("pxlscn-bot-detection", loops=10)
1920
sb.sleep(2)

examples/cdp_mode/raw_publication.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
if sb.is_element_present(shadow_head):
1111
sb.cdp.gui_click_element(shadow_head)
1212
sb.sleep(1.5)
13+
sb.cdp.click_if_visible('button[aria-label="Close"]')
1314
sb.cdp.remove_elements('div[class*="ad-container"]')
1415
sb.cdp.remove_elements("div.lite-page-ad")
1516
sb.sleep(0.5)

examples/raw_pixelscan.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
with SB(uc=True, incognito=True, test=True) as sb:
44
sb.driver.uc_open_with_reconnect("https://pixelscan.net/", 7)
5-
sb.remove_elements("div.banner") # Remove the banner
5+
sb.remove_elements(".bg-bannerBg") # Remove the top banner
6+
sb.remove_elements("pxlscn-ad1") # Remove the ad banner
67
sb.remove_elements("jdiv") # Remove chat widgets
78
no_automation_detected = "No automation framework detected"
89
sb.assert_text(no_automation_detected, "pxlscn-bot-detection")
910
not_masking_text = "You are not masking your fingerprint"
1011
sb.assert_text(not_masking_text, "pxlscn-fingerprint-masking")
11-
sb.highlight("span.text-success", loops=8)
12+
consistent_selector = 'div.bg-consistentBg [alt="Good"]'
13+
sb.highlight(consistent_selector, loops=8, scroll=False)
1214
sb.sleep(1)
1315
fingerprint_masking_div = "pxlscn-fingerprint-masking div"
1416
sb.highlight(fingerprint_masking_div, loops=9, scroll=False)
1517
sb.sleep(1)
16-
sb.highlight(".bot-detection-context", loops=10, scroll=False)
18+
sb.highlight("pxlscn-bot-detection", loops=10, scroll=False)
1719
sb.sleep(2)

0 commit comments

Comments
 (0)