-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documenting the selenium-stealth
integration with UC Mode
#2404
Comments
Stealth hasn't been updated in a while, is it still viable? |
@AlexPaiva Some people are still using it, so it's probably still valid, even though it hasn't been updated in awhile. But at this point, |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
how use stealth with SB(from seleniumbase import SB) and uc=True? adding
don't works |
@kitsune0n If the Also, |
I have used
In SB there is agent set method but not for timezone, we can set the timezone external raw script but it reset while disconnecting the driver, please let me know if there is a change to customize SB to override the method of reconnect, as I have used SB context-manager base so I need to customize uc_open, uc_click and reconnect method so I can execute timezone method each time
|
When UC Mode disconnects the driver from Chrome to evade detection, it also resets any settings made by Also, it appears that using Your best bet to avoid detection is by just using regular SeleniumBase UC Mode: from seleniumbase import SB
with SB(uc=True, incognito=True) as sb:
sb.uc_open_with_reconnect("https://pixelscan.net/", 10)
breakpoint() If you want timezone changes to be permanent, use a Chrome extension that changes your timezone. |
Yes, I want to change the timezone permanently, I have already removed that library because it's not updated. Can you please how to do with extension with SB? just give me a hint as we can install dynamically in driver but how? @mdmintz |
@PankajSavaliya For changing the timezone, you'll have to find an extension that does it. I hear they exist, but I don't know one off the top of my head directly. |
How to add the extension in SB if I have an extension so how to give the path of extension to SB? @mdmintz |
Adding an extension:
|
Documenting the
selenium-stealth
integration with UC Mode(Info:
selenium-stealth
lets you mask your web browser's fingerprint and WebGL information.)Prerequisites:
selenium-stealth
must be installed separately:pip install selenium-stealth
Here's an example of the selenium-stealth integration with the
Driver()
manager and UC Mode:selenium-stealth
also integrates with SeleniumBaseBaseCase
formats:Use Syntax Format 2 to override the
setUp()
method so thatselenium-stealth
settings are used:Then have your test classes inherit
BaseTestCase
instead ofBaseCase
.(See SeleniumBase/help_docs/syntax_formats.md#sb_sf_02 for details.)
To activate UC Mode in
BaseCase
formats, use--uc
as apytest
command-line option:For general information about
selenium-stealth
, see:For general information about UC Mode, see #2213
The text was updated successfully, but these errors were encountered: