Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

541
Views
Selenium Webdriver Import ChromeDriverManager Error

I've been using selenium webdriver; however, I am now attempting to interact with a page using Java (this is new to me). In attempting to do this, I've found this video that appears to be exactly what Im looking for:

https://www.youtube.com/watch?v=bBRFVIEiFIE

I keep getting an error message generated from the second line of the code:

from selenium import webdriver

from webdriver_manager.chrome import ChromeDriverManager

This is the error message:

 Traceback (most recent call last):
 File "C:\Users\erich\Desktop\SeleniumDrivers\State Scrape Java.py", line 2, in <module>
 from webdriver_manager.chrome import ChromeDriverManager
 File "C:\Python27\lib\site-packages\webdriver_manager\chrome.py", line 4, in <module>
 from webdriver_manager.driver import ChromeDriver
 File "C:\Python27\lib\site-packages\webdriver_manager\driver.py", line 77
 self.auth_header = {'Authorization': f'token {self._os_token}'}
                                                             ^
 SyntaxError: invalid syntax

I have made sure to pip install webdriver-manager and have attempted the two possible options on pypi.

Any help will be greatly appreciated!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try:

#selenium4 with python [pip install selenium4)

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

#options to add as arguments
from selenium.webdriver.chrome.options import Options
option = webdriver.ChromeOptions()
option.add_argument("start-maximized")

#chrome to stay open
option.add_experimental_option("detach", True)

driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()),options=option)
driver.get('https://www.example.com/')

WebdriverManager

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!