WebDriverException: Message: The browser appears to have exited before we could connect error with GeckoDriver Selenium and Python

前端 未结 5 1857
时光取名叫无心
时光取名叫无心 2020-12-11 17:07

There are about 100 posts about the same issue but none of them seem to work for me, hence asking again. I\'m trying to launch a Firefox browser using Python and Selenium an

5条回答
  •  执笔经年
    2020-12-11 17:32

    After trying almost all of the answers on different forums, a simple self trial resolved the problem and i.e. you need to have python, firefox browser and geckodriver in either 62 bit or 32 bit. Mismatch in this caused the problem in my case.

    After ensuring that you are using the same bit version for all the 3 components, just use following lines to run firefox:

    ffPath = "C:\\Drivers\\geckodriver.exe"
    os.environ["webdriver.firefox.driver"] = ffPath
    driver = webdriver.Firefox(executable_path=ffPath)
    driver.get(url)
    

提交回复
热议问题