Getting error message in console | Selenium Forum
M
Posted on 30/01/2017
Sir,

While running below code, able to open the Mozzila fire fox.

But showing error message in the console. Refer below code.Help me in this regard.

Code :
=====================
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Driver_Sel {

public static void main(String[] args) {
// TODO Auto-generated method stub
// System.setProperty("webdriver.firefox.marionette","C:\\Gecko\\geckodriver.exe");
System.setProperty("webdriver.gecko.driver", "C:\\Gecko\\geckodriver.exe");
// WebDriver driver = new FirefoxDriver();
new FirefoxDriver();
// driver.get("http://www.google.com/");
}

}

========================

Console Error
============

1485873992637 geckodriver INFO Listening on 127.0.0.1:31979
Jan 31, 2017 6:46:32 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
1485873993741 mozprofile::profile INFO Using profile path C:\Users\JK\AppData\Local\Temp\rust_mozprofile.1RWe67xUcFPw
1485873993757 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe
1485873993873 geckodriver::marionette INFO Connecting to Marionette on localhost:51772
Jan 31, 2017 6:46:41 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Falling back to original OSS JSON Wire Protocol.
1485874001776 mozprofile::profile INFO Using profile path C:\Users\JK\AppData\Local\Temp\rust_mozprofile.TiwS1toxPNrt
1485874001852 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe
1485874002005 geckodriver::marionette INFO Connecting to Marionette on localhost:51783
Jan 31, 2017 6:46:53 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Falling back to straight W3C remote end connection
1485874014051 mozprofile::profile INFO Using profile path C:\Users\JK\AppData\Local\Temp\rust_mozprofile.X1OSwRsuec8B
1485874014080 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Mozilla Firefox\firefox.exe
1485874014569 geckodriver::marionette INFO Connecting to Marionette on localhost:51808
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@5700d6b1, browserName=firefox, moz:firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@5700d6b1, version=, platform=ANY}], required capabilities = Capabilities [{}]
Build info: version: 'unknown', revision: '1969d75', time: '2016-10-18 09:43:45 -0700'
System info: host: 'JK-PC', ip: '192.168.0.100', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_111'
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:238)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:127)
at Driver_Sel.main(Driver_Sel.java:12)
=============================

Thnaks

M
Replied on 30/01/2017

what is your firefox version?


M
Replied on 31/01/2017

Fire fox version 4.03


M
Replied on 31/01/2017

use firefox 50.