Selenium 3.0 Firefx Driver fails with org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session
24,301
Solution 1
this issue is solved with geckodriver 0.15 and selenium 3.3 version.
Solution 2
You need to download geckodriver. And then set
System.setProperty("webdriver.gecko.driver", "path\\to\\geckodriver.exe")
Check this link.
Comments
-
KingArasan almost 2 years
Selenium 3.0 Firefx Driver fails with org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session.
System.setProperty("webdriver.gecko.driver", "..<Path>../geckodriver.exe"); capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("marionette", true); driver = new FirefoxDriver(capabilities); Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@23aa363a, browserName=firefox, moz:firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@23aa363a, version=, platform=ANY}], required capabilities = Capabilities [{}] Build info: version: '3.0.0', revision: '350cf60', time: '2016-10-13 10:48:57 -0700' System info: host: 'D202540', ip: '10.22.19.193', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_45' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:259) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)
-
KingArasan over 7 yearsI am setting the System property but still getting the error, System.setProperty("webdriver.gecko.driver", "..<Path>../geckodriver.exe"); capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("marionette", true); driver = new FirefoxDriver(capabilities);
-
Immers Cherub over 7 yearsHow are you writing the path to the geckodriver.exe?
-
Immers Cherub over 7 yearsThe path format should be "D:\\work\\project\\geckodriver.exe". It will not work if you just set the path as you just wrote above.
-
Walter G. almost 7 yearsThis made me realize that for geckodriver 0.17 you need Selenium 3.4.0
-
eskoba about 6 yearsI still have the same problem with geckodriver 0.20.1 and Selenium 3.11.0. Here is my question: stackoverflow.com/questions/49969902/…