How to use executable_path like original selenium python #1761
-
Hi, how to use executable_path and chrome options like original selenium python |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
To set the browser executable path (Chrome binary location), you can use a command-line option when you run Example: pytest test_demo_site.py --binary-location="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" The options are similar, but different. (See https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/pytest_plugin.py) |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply :) I don't use pytest. Can I use seleniumbase like regular selenium? I've created a class that I can access this driver with self.driver, something like this,
I don't know how to implement Selenium Base like that. Please help, thank you. |
Beta Was this translation helpful? Give feedback.
-
Hi @mdmintz , I still want to be able to use seleniumbase like regular selenium, with the implementation of undetected mode (uc). Alternatively, could you please help me with providing the code implementation of UC for the Driver Manager? Thank you very much. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to specify the path to the binary via the Driver construction? For example: driver_version = 127
chrome_path = os.path.join(dir_path, "chrome", "chrome")
driver = Driver(
uc=True,
headed=False,
devtools=False,
remote_debug=False,
driver_version=chrome_version,
binary_location=chrome_path,
proxy=f"socks5://{use_proxy}",
no_sandbox=True,
) This works in regular Selenium of course, but it's not working for me in SB for some reason. |
Beta Was this translation helpful? Give feedback.
To set the browser executable path (Chrome binary location), you can use a command-line option when you run
pytest
:--binary-location=PATH
Example:
pytest test_demo_site.py --binary-location="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
The options are similar, but different. (See https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/pytest_plugin.py)