Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (7k points)

I am using windows10, Firefox 45.0.1, Java 8 and Selenium: library 2.47.1. This is my code:
 

public class TestClass01 

{

    static final Logger logger1 =     LogManager.getLogger(TestClass01.class.getName());

    WebDriver driver ; 

    String baseUrl ;

    static int testCount = 0 ;

    String[] content_heading ;

    List<WebElement> temp_list ;

    WebDriverWait wait;

    boolean exists;

    @BeforeClass

    public void beforeClass() 

    {

        logger1.entry();

        logger1.info("Entering the class : " + this.getClass().getSimpleName() );

        driver = new FirefoxDriver();

        baseUrl = "http://www.google.com";

        logger1.info("Maximizing the browser window and setting up the implicit timeout for element/page loading....");

        driver.manage().window().maximize();

        //Specifies the amount of time the driver should wait when searching for an element

        driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);

        logger1.info("Fetching the Homepage for Jacuzzi");

        // launch Firefox and direct it to the Base URL

        driver.get(baseUrl+"/");


 

    }

}

However, it is throwing the following error:
 

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: DEBUG Updating XPIState for {"id":"{972ce4c6-7e08-4474-a285-3208198ce6fd}","syncGUID":"BbZlO30v46U7","location":"app-global","version":"45.0.1","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1458533973089,"updateDate":1458533973089,"applyBackgroundUpdates":1,"skinnable":true,"size":22012,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"45.0.1","maxVersion":"45.0.1"}],"targetPlatforms":[],"seen":true}

1 Answer

0 votes
by (13.1k points)

This is happening because of the new issue in the latest firefox browser.

Update your selenium jars. The new version of Firefox is not supporting old jars of selenium,

You can  download Selenium server, Selenium Client, and web driver language bindings

You have to replace them with the old jars you are using. Update your Mozilla also so you can get the updated results.

source: http://docs.seleniumhq.org/download/

To overcome this issue also need to setPreference as xpinstall.signatures.required, false to the firefox profile, and then pass it to the driver object.

firefoxProfile.setPrefernce(“xpinstall.signatures.required”,false);

Want to learn Java? Check out the Core Java Certification from Intellipaat.

Browse Categories

...