Webdriverexception: Message: Newsession With Geckodriver Firefox V65 And Selenium Through Python 3.7
I am trying to use Python 3.7 + Selenium + Geckodriver + Firefox v65.0 for scraping. New window is opening, but Firefox does not sent correct respond about session to Python and cr
Solution 1:
Not sure where things are going wrong but there seems to be a mixup with multiple binary versions. However I am using the following configuration:
Python: 3.6.1
C:\Users\user_name>python Python 3.6.1 (v3.6.1:69c0db5, Mar 212017, 17:54:52) [MSC v.190032 bit (Intel)] on win32 Type "help", "copyright", "credits"or"license"for more information. >>>
Selenium: 3.141.0
C:\Users\user_name>pip show -V seleniumName: seleniumVersion: 3.141.0Summary: Python bindings for SeleniumHome-page: https://github.com/SeleniumHQ/selenium/Author: UNKNOWNAuthor-email: UNKNOWNLicense: Apache 2.0Location: c:\python\lib\site-packagesRequires: urllib3Required-by:
GeckoDriver: 0.24.0
C:\Utility\BrowserDrivers>geckodriver.exe -V geckodriver 0.24.0 ( 2019-01-28) The source code of this program is available from testing/geckodriver in https://hg.mozilla.org/mozilla-central. This program is subject to the terms of the Mozilla Public License 2.0. You can obtain a copy of the license at https://mozilla.org/MPL/2.0/.
Firefox: Mozilla Firefox 65.0
C:\Program Files\Mozilla Firefox>firefox -v |more Mozilla Firefox 65.0
I have taken your own code and executed it adding the argumentexecutable_path
as follows:
Code Block:
from selenium import webdriver with webdriver.Firefox(executable_path=r'C:\Utility\BrowserDrivers\geckodriver.exe') as driver: driver.get("http://google.com") print("Page Title is : %s" %driver.title) driver.quit()
Console Output:
Page Title is : Google
Post a Comment for "Webdriverexception: Message: Newsession With Geckodriver Firefox V65 And Selenium Through Python 3.7"