selenium.common.exceptions.WebDriverException: Message: unknown error: Failed to create Chrome process with ChromeDriver Chrome with Selenium Python

后端 未结 2 2062
猫巷女王i
猫巷女王i 2020-12-11 13:09

I am trying to click a button using selenium so I made it find the element with the xpath since i couldn\'t find the id . EDIT: I didn\'t think the rest of the code had anyt

2条回答
  •  星月不相逢
    2020-12-11 13:52

    you have to edit

    driver = webdriver.Chrome(executable_path="C:\chromedriver.exe")
    

    to

    driver = webdriver.Chrome(executable_path="C:\\chromedriver.exe")
    

    you miss \

    If you get the same error, try running as administrator

    or

    move chromedriver.exe to other path like c:/seleniumdriver/chromedriver.exe"and edit executable_path

提交回复
热议问题