Skip to content
\n

Page will detect chrome as being in incognito despite being a normal window:

\n\"Linux\n

As opposed to the same code being run on Windows:

\n\"Windows\n

And the browser going to the same page manually without using Seleniumbase on Linux:

\n\"Linux\n

Is there a way to make it not be detected as an incognito window in UC mode on Linux?

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

Try this script:

\n
from seleniumbase import SB\n\nwith SB(uc=True, test=True) as sb:\n    url = \"https://pixelscan.net/fingerprint-check\"\n    sb.activate_cdp_mode(url)\n    sb.remove_element(\"#headerBanner\")\n    sb.wait_for_element(\"pxlscn-dynamic-ad\")\n    sb.sleep(0.5)\n    sb.remove_elements(\"pxlscn-dynamic-ad\")\n    sb.sleep(2)\n    sb.assert_text(\"No masking detected\", \"pxlscn-fingerprint-masking\")\n    sb.assert_text(\"No automated behavior\", \"pxlscn-bot-detection\")\n    sb.cdp.highlight('span:contains(\"is consistent\")')\n    sb.sleep(1)\n    sb.cdp.highlight(\"pxlscn-fingerprint-masking p\")\n    sb.sleep(1)\n    sb.cdp.highlight(\"pxlscn-bot-detection p\")\n    sb.sleep(2)
\n\"Screenshot","upvoteCount":1,"url":"https://github.com/seleniumbase/SeleniumBase/discussions/4164#discussioncomment-15226514"}}}
Discussion options

You must be logged in to vote

Try this script:

from seleniumbase import SB

with SB(uc=True, test=True) as sb:
    url = "https://pixelscan.net/fingerprint-check"
    sb.activate_cdp_mode(url)
    sb.remove_element("#headerBanner")
    sb.wait_for_element("pxlscn-dynamic-ad")
    sb.sleep(0.5)
    sb.remove_elements("pxlscn-dynamic-ad")
    sb.sleep(2)
    sb.assert_text("No masking detected", "pxlscn-fingerprint-masking")
    sb.assert_text("No automated behavior", "pxlscn-bot-detection")
    sb.cdp.highlight('span:contains("is consistent")')
    sb.sleep(1)
    sb.cdp.highlight("pxlscn-fingerprint-masking p")
    sb.sleep(1)
    sb.cdp.highlight("pxlscn-bot-detection p")
    sb.sleep(2)

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@C-J-Astbury
Comment options

@mdmintz
Comment options

@C-J-Astbury
Comment options

@mdmintz
Comment options

@C-J-Astbury
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants