-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Is there any method in combination with selenium-stealth ? #942
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
Comments
By the looks of it, you can integrate it directly into the custom from seleniumbase import BaseCase
from selenium_stealth import stealth
class BaseTestCase(BaseCase):
def setUp(self):
super().setUp()
stealth(self.driver,
languages=["en-US", "en"],
vendor="Google Inc.",
platform="Win32",
webgl_vendor="Intel Inc.",
renderer="Intel Iris OpenGL Engine",
fix_hairline=True,
) It's that simple. No extra code is required on the SeleniumBase side. |
How can I choose my custom chromedriver file?. |
@thanhvodad The chromedriver used is the one that's on your system path. So if you want to use a specific chromedriver, make sure that it's the only one on the path. SeleniumBase adds the |
object has no attribute 'browser' |
@thanhvodad You can call the |
what will be the correct command, when i want to check if it's browe.chorme, if yes i will use stealth |
def setUp(self):
super().setUp()
if self.browser == "chrome":
stealth(
self.driver,
languages=["en-US", "en"],
vendor="Google Inc.",
platform="Win32",
webgl_vendor="Intel Inc.",
renderer="Intel Iris OpenGL Engine",
fix_hairline=True,
) (Make sure you call |
I tried, yes seleniumbase has been caught by google automatically, I login google it will say :( |
@thanhvodad If you're looking to avoid Selenium detection, you should see https://stackoverflow.com/questions/33225947/can-a-website-detect-when-you-are-using-selenium-with-chromedriver/52108199#52108199 and the solution for that here: https://stackoverflow.com/a/52108199 In summary, you'll have to modify After running the line above, you'll probably see a bunch of gibberish. Do the following:
|
https://pypi.org/project/selenium-stealth/
It is a library that combines with selenium to stealth over google, is there any way to integrate it into seleniumbase, it's very good
The text was updated successfully, but these errors were encountered: