Closed alpersarac closed 1 year ago
I solved the problem by replacing self.driver = webdriver.Firefox(executable_path=GeckoDriverManager().install()) this line in LinkedIn.py with: self.driver = webdriver.Firefox(service=Service(executable_path=GeckoDriverManager().install()))
Yep that fixed mine too
I am glad you fixed the issue
Thank you for fixing it @alpersarac
Thank you for fixing it @alpersarac
My pleasure
I am getting this exception below I don't why
Traceback (most recent call last): File "C:\Users\90507\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 42, in get_path path = SeleniumManager().driver_location(options) if path is None else path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\90507\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 74, in driver_location browser = options.capabilities["browserName"] ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'capabilities'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\90507\linkedin-application-bot\linkedin.py", line 247, in
Linkedin().driver.quit()
^^^^^^^^^^
File "C:\Users\90507\linkedin-application-bot\linkedin.py", line 38, in init
self.driver = webdriver.Chrome(ChromeDriverManager().install())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\90507\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 47, in init
self.service.path = DriverFinder.get_path(self.service, self.options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\90507\AppData\Local\Programs\Python\Python311\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 44, in get_path
raise NoSuchDriverException(f"Unable to obtain {service.path} using Selenium Manager; {err}")
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain chromedriver using Selenium Manager; 'str' object has no attribute 'capabilities'; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location