Closed jtranquilli closed 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)`
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())
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.
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.