UnreachableBrowserException Caused by: java.lang.NullPointerException when “webdriver.firefox.marionette” is used

Here is the Answer to your Question:

The error UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure says it all.

As per guru99.com it is mentioned to use webdriver.firefox.marionette within System.setProperty. In Selenium 3.x we would be using webdriver.gecko.driver instead.

So consider changing the line of code:

System.setProperty("webdriver.firefox.marionette","C:\\geckodriver.exe");

to:

System.setProperty("webdriver.gecko.driver","C:\\your_directory\\geckodriver.exe");

Let me know if this Answers your Question.

Leave a Comment