1

I am using Selenium WebDriver for Automated test.
IDE: eclipse
Test Framework: TestNG
Language: Java

WebDriver driver = = new FirefoxDriver();

After running the test, the following error was found:

[TestNG] Running:
  /tmp/testng-eclipse-2118619437/testng-customsuite.xml

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms

Can anybody help me?

3
  • 2
    FF version? Selenium version? Did you try in other browsers? Commented Jun 25, 2012 at 13:49
  • FF version: 5.0.1 I am using WebDriver Commented Jun 26, 2012 at 3:27
  • 1
    which version of selenium jar? Commented Jun 28, 2012 at 14:00

2 Answers 2

1

Are you using a proxy to connect to the internet? If yes then you'll need to set a proxy for your FF driver.

First you'll need to import the Proxy class-

import org.openqa.selenium.Proxy;

Then, you'll need to create an instance of the Proxy class and set a proxy on it-

proxy= new Proxy();
proxy.setHttpProxy("10.1.2.47:80");

Now, create an instance of the FF driver and it should work fine.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for your answer. It might be a case. In my case, it was version incompatibility of Selenium 2 and FF. I have updated both and working well.
Which versions of FF and Webdriver do you use now? Now I am experiencing the same problem :P I am using FF-11 with Webdriver 2.24.1
you should use FF 12 and above I think. If FF 12 does not work you can use higher version with 2.24.1
0

The problem is resolved at my end . I tool selenium-server-standalone-2.41.0.jar an all the errors are gone , I am able to run my test suites now .

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.