I'm using selenium 2.8. I am getting a crazy error like this:
testPersistence(com.***.***.selenium.test.PersistenceTest) Time elapsed: 0.032 sec <<< ERROR! java.lang.RuntimeException: Could not start Selenium session: ^@ at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:107) at com.***.***.selenium.test.PersistenceTest.testPersistence(PersistenceTest.java:37) 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.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103) at org.apache.maven.surefire.Surefire.run(Surefire.java:169) 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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021) Caused by: com.thoughtworks.selenium.SeleniumException: ^@ at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:106) at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:275) at com.thoughtworks.selenium.HttpCommandProcessor.start(HttpCommandProcessor.java:237) at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:98) ... 28 more
my test class is very simple. its got a test like thislike this:
@Test
public void testPersistence() throws InterruptedException {
DefaultSelenium selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://localhost:8080");
selenium.start();
selenium.waitForPageToLoad("30000");
selenium.open("/***/register.seam");
selenium.waitForPageToLoad("30000");
selenium.type("registration:username", "jackman");
Thread.sleep(5000);
selenium.type("registration:name", "Jack Daniels");
Thread.sleep(5000);
selenium.type("registration:password", "123456789");
Thread.sleep(5000);
selenium.click("registration:register");
selenium.waitForPageToLoad("30000");
Thread.sleep(5000);
assertTrue(selenium.isTextPresent("regexpi:Welcome"));
selenium.stop();
}
Can anyone help me please?
thanks in advance