Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmintz committed Jan 22, 2025
1 parent f3361b8 commit 4dd7cc7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
9 changes: 5 additions & 4 deletions examples/cdp_mode/raw_pixelscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
with SB(uc=True, incognito=True, test=True) as sb:
sb.activate_cdp_mode("https://pixelscan.net/")
sb.sleep(3)
sb.remove_elements("div.banner") # Remove the banner
sb.remove_elements(".bg-bannerBg") # Remove the top banner
sb.remove_elements("pxlscn-ad1") # Remove the ad banner
sb.remove_elements("jdiv") # Remove chat widgets
sb.cdp.scroll_down(15)
not_masking_text = "You are not masking your fingerprint"
sb.assert_text(not_masking_text, "pxlscn-fingerprint-masking")
no_automation_detected = "No automation framework detected"
sb.assert_text(no_automation_detected, "pxlscn-bot-detection")
sb.highlight("span.text-success", loops=8)
consistent_selector = 'div.bg-consistentBg [alt="Good"]'
sb.highlight(consistent_selector, loops=8)
sb.sleep(1)
fingerprint_masking_div = "pxlscn-fingerprint-masking div"
sb.highlight(fingerprint_masking_div, loops=9)
sb.sleep(1)
sb.highlight(".bot-detection-context", loops=10)
sb.highlight("pxlscn-bot-detection", loops=10)
sb.sleep(2)
1 change: 1 addition & 0 deletions examples/cdp_mode/raw_publication.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
if sb.is_element_present(shadow_head):
sb.cdp.gui_click_element(shadow_head)
sb.sleep(1.5)
sb.cdp.click_if_visible('button[aria-label="Close"]')
sb.cdp.remove_elements('div[class*="ad-container"]')
sb.cdp.remove_elements("div.lite-page-ad")
sb.sleep(0.5)
Expand Down
8 changes: 5 additions & 3 deletions examples/raw_pixelscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

with SB(uc=True, incognito=True, test=True) as sb:
sb.driver.uc_open_with_reconnect("https://pixelscan.net/", 7)
sb.remove_elements("div.banner") # Remove the banner
sb.remove_elements(".bg-bannerBg") # Remove the top banner
sb.remove_elements("pxlscn-ad1") # Remove the ad banner
sb.remove_elements("jdiv") # Remove chat widgets
no_automation_detected = "No automation framework detected"
sb.assert_text(no_automation_detected, "pxlscn-bot-detection")
not_masking_text = "You are not masking your fingerprint"
sb.assert_text(not_masking_text, "pxlscn-fingerprint-masking")
sb.highlight("span.text-success", loops=8)
consistent_selector = 'div.bg-consistentBg [alt="Good"]'
sb.highlight(consistent_selector, loops=8, scroll=False)
sb.sleep(1)
fingerprint_masking_div = "pxlscn-fingerprint-masking div"
sb.highlight(fingerprint_masking_div, loops=9, scroll=False)
sb.sleep(1)
sb.highlight(".bot-detection-context", loops=10, scroll=False)
sb.highlight("pxlscn-bot-detection", loops=10, scroll=False)
sb.sleep(2)

0 comments on commit 4dd7cc7

Please sign in to comment.