org.openqa.selenium.firefox.NotConnectedException getting exception while executing tests on Firefox using WebDriver

Solved 1 Answers 95 Views Selenium
0 1

package org.openqa.selenium.example;

import java.util.List;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class GoogleSuggest {
    public static void main(String[] args) throws Exception {
        // The Firefox driver supports javascript
        WebDriver driver = new FirefoxDriver();

        // Go to the Google Suggest home page

        // Enter the query string "Cheese"
        WebElement query = driver.findElement(By.name("q"));

        // Sleep until the div we want is visible or 5 seconds is over
        long end = System.currentTimeMillis() + 5000;
        while (System.currentTimeMillis() < end) {
            WebElement resultsDiv = driver.findElement(By.className("gssb_e"));

            // If results have been returned, the results are displayed in a drop down.
            if (resultsDiv.isDisplayed()) {

        // And now list the suggestions
        List<WebElement> allSuggestions = driver.findElements(By.xpath("//td[@class='gssb_a gbqfsf']"));

        for (WebElement suggestion : allSuggestions) {

Error -

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host on port 7055 after 45000 ms. Firefox console output:
419587346786    addons.xpi-utils    DEBUG   Make addon app-profile:[email protected] visible
1419587346788   DeferredSave.extensions.json    DEBUG   Save changes
1419587346788   DeferredSave.extensions.json    DEBUG   Save changes
1419587346789   addons.xpi  DEBUG   New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
1419587346793   addons.xpi-utils    DEBUG   Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1419587346793   DeferredSave.extensions.json    DEBUG   Save changes
1419587346793   DeferredSave.extensions.json    DEBUG   Save changes
1419587346793   addons.xpi  DEBUG   New add-on {D19CA586-DD6C-4a0a-96F8-14644F340D60} installed in winreg-app-global
1419587346803   addons.xpi-utils    DEBUG   Make addon winreg-app-global:{D19CA586-DD6C-4a0a-96F8-14644F340D60} visible
1419587346803   DeferredSave.extensions.json    DEBUG   Save changes
1419587346803   DeferredSave.extensions.json    DEBUG   Save changes

1 Answer

Best answer

Solution is already given here.


There are three possible solutions

1.) You need to upgrade your selenium libraries.

2.) Make sure that Symantec plugin is uninstalled.

3.) Downgrade your version.

here we do not have complete log. So, not sure which plugin is disturbing your execution. I would suggest you to remove all the plugins you have installed in firefox.

answered by
selected by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

We have resolved 1.2k+ Software Testing queries!

Top Contributors