简体   繁体   中英

Selenium and Eclipse_java and firefox testing issue

I received the following error when I tried to run a Selenium test case that I exported from Selenium IDE into Eclipse (exported as JUnit4 Webdriver):

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: Couldn't read application.iniCouldn't read application.ini

I have the following Installed on my Mac OS X 10.7.5:

Selenium IDE -- Latest Selenium Standalone server from SeleniumHQ -- Java Selenium Client & Webdriver language bindings from Selenium HQ -- Latest version of Eclipse -- ChromeDriver -- Firefox.

I am a beginner so please do not hold it against me if I bomb on any terminology or Logic, just tryna learn here. I am using it to automate testing for some Webapps and boy what a challenge this is! Any help/guidance would be greatly appreciated. Let me know if you need any more information.

Thanks for the prompt response guys. To answer your questions. This is the entirety of the error message:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: Couldn't read application.iniCouldn't read application.ini at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118) at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:250) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:110) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:197) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:190) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:186) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:99) at Day1.search_test1.setUp(search_test1.java:20) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.Framewo rkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(Parent Runner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

I think you should try taking a step back and putting together the simplest possible test that you can from the Selenium documentation on their website. Don't use Selenium IDE to write your code for you. Maybe you could try "Selenium Builder" but I would recommend just writing the test by hand. After that, if it still doesn't work, edit your question and show us the code you tried to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM