Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

542
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda