nateshmbhat / webbot

Web automation library for simple and easy end to end testing and web browser automation that offers super charged features while keeping it simple to use and master
https://pypi.org/project/webbot/
Mozilla Public License 2.0
239 stars 87 forks source link

Webbot is not working on linux(parrot) #74

Open Slakesslumban opened 2 years ago

Slakesslumban commented 2 years ago

┌─[✗]─[nawnit@asus]─[~] └──╼ $python /home/nawnit/Desktop/python3.py Traceback (most recent call last): File "/home/nawnit/Desktop/python3.py", line 4, in driver = Browser() File "/home/nawnit/.local/lib/python3.9/site-packages/webbot/webbot.py", line 68, in init self.driver = webdriver.Chrome(executable_path=driverpath, options=options) File "/usr/lib/python3/dist-packages/selenium/webdriver/chrome/webdriver.py", line 95, in init RemoteWebDriver.init( File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 152, in init self.start_session(capabilities, browser_profile) File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 249, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 318, in execute self.error_handler.check_response(response) File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary (Driver info: chromedriver=2.39.562737 (dba483cee6a5f15e2e2d73df16968ab10b38a2bf),platform=Linux 5.10.0-6parrot1-amd64 x86_64)

manwapri commented 2 years ago

Perform step no 3 to 6, You need to find the installation location of webbot.

Step 1: Open cmd and fire pip command pip install webbot

Step 2: check your chrome version go to Menu -> Help -> About Google Chrome

Step 3: Download chrome driver as per the chrome version from below link https://sites.google.com/a/chromium.org/chromedriver/downloads

Step 4: extract the driver file and save it to, C:\Users%USERNAME%\AppData\Local\Programs\Python\Python39\lib\site-packages\webbot\drivers\

Step 5: In drivers forlder, make copy of chrome_windows (Simply copy the file & paste it in same folder) new file will be like "chrome_windows - Copy.exe" and delete the original "chrome_windows.exe"

Step 6: Rename the extracted file "chromedriver.exe" to "chrome_windows.exe"

carloalbertogiordano commented 1 year ago

If you are working under linux you actually need to rename the chrome driver to chrome_linux, not chrome_windows.exe Also from what I understand you can keep it in your project folder. Hope it helps

nrnw commented 1 year ago

Perform step no 3 to 6, You need to find the installation location of webbot.

Step 1: Open cmd and fire pip command pip install webbot

Step 2: check your chrome version go to Menu -> Help -> About Google Chrome

Step 3: Download chrome driver as per the chrome version from below link https://sites.google.com/a/chromium.org/chromedriver/downloads

Step 4: extract the driver file and save it to, C:\Users%USERNAME%\AppData\Local\Programs\Python\Python39\lib\site-packages\webbot\drivers\

Step 5: In drivers forlder, make copy of chrome_windows (Simply copy the file & paste it in same folder) new file will be like "chrome_windows - Copy.exe" and delete the original "chrome_windows.exe"

Step 6: Rename the extracted file "chromedriver.exe" to "chrome_windows.exe"

New driver download page https://sites.google.com/chromium.org/driver/?pli=1

If you're on linux. The path is ~/.local/lib/python3.8/site-packages/webbot/drivers

Copy "chromedriver" file here and rename it to "chrome_linux"