Jump to content
dfdsfsdfdsf

Erro ao iniciar Selenium e ChromeDriver

Recommended Posts

dfdsfsdfdsf

Estou iniciando ainda com o Selenium, usando o python 3.6 na IDE PyCharm e o Chrome para abrir os links. Esse código é para logar no facebook usando o Selenium mas ao executar ele abre o Chrome com apenas data:, no campo da url. Quando fechando apresenta inúmeros erros. Se alguém já tiver corrigido esse erro ou souber como posso faze-lo agradeço.

Traceback (most recent call last):
  File "C:/Users/Faganelo/Desktop/scripts py3.6/facebook test.py", line 6, in <module>
    driver = webdriver.Chrome("/Users/Faganelo/Downloads/chromedriver")
  File "C:\Users\Faganelo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 75, in __init__
    desired_capabilities=desired_capabilities)
  File "C:\Users\Faganelo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 156, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Users\Faganelo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 251, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Users\Faganelo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 320, in execute
    self.error_handler.check_response(response)
  File "C:\Users\Faganelo\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created exception: Chrome version must be >= 67.0.3396.0
  (Driver info: chromedriver=2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 6.1.7601 SP1 x86_64)

 

from selenium import webdriver
import time
username = 'email@email.com'
password = 'Senha'
url = 'https://www.facebook.com/'
driver = webdriver.Chrome("/Users/Faganelo/Downloads/chromedriver")
driver.get(url)
driver.find_element_by_id('email').send_keys(username)
driver.find_element_by_id('pass').send_keys(password)
time.sleep(2)
driver.find_element_by_id('loginbutton').click()

 

Share this post


Link to post
Share on other sites
Boflawok

Eu não tenho a certeza, mas isto:

1 hour ago, joaopedro_faganelo said:

Chrome version must be >= 67.0.3396.0

parece indicar que o teu navegador esta desatualizado.

 

Para resolver o problema(se esse for o problema), penso que devias instalar a versão 67.0.3396.0 ou outra mais recente.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.