wodsuz / EasyApplyJobsBot

A python bot to automatically apply all Linkedin,Glassdoor, etc Easy Apply jobs based on your preferences. Auto login, auto fill additional questions, apply automatically!
https://www.automated-bots.com/
Other
424 stars 141 forks source link

Selenium can't find chrome binary #41

Closed jtranquilli closed 1 year ago

jtranquilli commented 1 year ago

I've been working on debugging this for a few days now. Selenium and Chrome are both updated to the most recent versions, which should be compatible with each other. The steps I've followed in debugging this so far are as follows.

  1. Ensure that chrome is actually installed.
  2. Delete and reinstall google-chrome as well as selenium to ensure newest versions
  3. Check that the correct version of chrome-driver is being used. The LinkedIn.py file uses ChromeDriverManager which should automatically handle matching the version of ChromeDriver with the installed Chrome browser, so this should not be an issue.
  4. Adding the "update=True" flag to line 15 of LinkedIn.py, i.e., line 15 become self.driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install(update=True)),options=utils.chromeBrowserOptions()) This is just an insurance policy to force ChromeDriverManager to delete the existing driver and download the latest version.
jtranquilli commented 1 year ago

The solution I found is to import Options from selenium.webdriver.chrome.options then directly state the path to the chrome binary in Linkedin.py. The updated first 18 lines of the Llinkedin.py file should look like this:

import time,math,random,os import utils,constants,config

[from selenium import webdriver](url) from selenium.webdriver.common.by import By from utils import prRed,prYellow,prGreen

from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.service import Service as ChromeService from selenium.webdriver.chrome.options import Options class Linkedin: def __init__(self): chrome_options = Options() chrome_options.binary_location = "/Applications/GoogleChrome.app/Contents/MacOS/Google Chrome"

       ` prYellow("🌐 Bot will run in Chrome browser and log in Linkedin for you.")`
        `self.driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()),options=chrome_options)`
Wilson-D-Lee commented 1 year ago

If you're still having issues - ive fixed it by updating the following:

Linkedin.py - Line 26

replace: self.driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install(update=True)),options=utils.chromeBrowserOptions())

With this: self.driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager(version="114.0.5735.90").install()), options=utils.chromeBrowserOptions())