UnreachableBrowserException in launching Firefox

34 views
Skip to first unread message

Pavithra lal

unread,
May 29, 2017, 5:36:23 AM5/29/17
to Selenium Users
I am facing the exception - Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

I am using Firefox version 53, GeckoDriver 16, Selenium 3.4 in Windows 8 64 bit system. I tried all possible solution in Stackoverflow...Please help me...Am I doing anything wrong with version compatibility...???????????/

Akshat Gupta

unread,
May 29, 2017, 5:42:30 AM5/29/17
to Selenium Users
Code?

Pavithra lal

unread,
May 29, 2017, 5:48:02 AM5/29/17
to Selenium Users
This is the code

package TestPackage;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.RemoteWebDriver;

public class MyClass {
public static void main(String[] args) {
       // declaration and instantiation of objects/variables
    WebDriver driver ;
    System.setProperty("webdriver.firefox.marionette","C:\\geckodriver-v0.16.1-win64\\geckodriver.exe");
    driver = new FirefoxDriver();
       String baseUrl = "http://newtours.demoaut.com";
       String expectedTitle = "Welcome: Mercury Tours";
       String actualTitle = "";

       // launch Fire fox and direct it to the Base URL
       driver.get(baseUrl);

       // get the actual value of the title
       actualTitle = driver.getTitle();

       /*
        * compare the actual title of the page with the expected one and print
        * the result as "Passed" or "Failed"
        */
       if (actualTitle.contentEquals(expectedTitle)){
           System.out.println("Test Passed!");
       } else {
           System.out.println("Test Failed");
       }
       
       //close Fire fox
       driver.close();
      
       // exit the program explicitly
       System.exit(0);
   }
}

On Monday, 29 May 2017 15:12:30 UTC+5:30, Akshat Gupta wrote:
Code?

Akshat Gupta

unread,
May 29, 2017, 5:50:03 AM5/29/17
to Selenium Users
Hi

Try to use this,

"webdriver.gecko.driver" in setProperty


Pavithra lal

unread,
May 29, 2017, 5:57:44 AM5/29/17
to Selenium Users
Thank you so much. It is working now. This is my first test automation script....

And can U explain how it got resolved? What is the cause?

Akshat Gupta

unread,
May 29, 2017, 6:01:15 AM5/29/17
to Selenium Users

Pavithra lal

unread,
May 29, 2017, 6:06:05 AM5/29/17
to Selenium Users
Reply all
Reply to author
Forward
0 new messages