Browser Driver issues in WSL #1723
-
Hi ! I am running WSL instance and trying to do seleniumbase automation testing but the issue is pytest is unable to detect chromedriver or any driver when it is already there is the environment. How to deal with this ? Unable to find any solution online. Attaching the error below |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That error means that SeleniumBase can't find Chrome on your system. (Not the driver). If Chrome isn't located at the usual location, you can change where SeleniumBase looks for it: #1709 Example: pytest test_demo_site.py --binary-location="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" Also as an option for other Syntax Formats: from seleniumbase import Driver
from seleniumbase import js_utils
from seleniumbase import page_actions
driver = Driver(browser="chrome", binary_location="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome")
try:
driver.get("https://seleniumbase.io/apps/calculator")
page_actions.wait_for_element(driver, "4", by="id").click()
page_actions.wait_for_element(driver, "2", by="id").click()
page_actions.wait_for_text(driver, "42", "output", by="id")
js_utils.highlight_with_js(driver, "#output", loops=6)
finally:
driver.quit() |
Beta Was this translation helpful? Give feedback.
That error means that SeleniumBase can't find Chrome on your system. (Not the driver).
If Chrome isn't located at the usual location, you can change where SeleniumBase looks for it: #1709
(for seleniumbase
4.12.3
or newer)Example:
pytest test_demo_site.py --binary-location="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
Also as an option for other Syntax Formats: