how to execute a junit test case in netbeans using selenium commands?

79 views
Skip to first unread message

sujeetha

unread,
Apr 5, 2010, 12:31:11 AM4/5/10
to Selenium Users
i get this error. the url specified in setup command not getting
executed. the following error comes. can any one helpme in running
junit testcase in netbeans. i have added required jars in test
libraries and also started server.jar in command line.

this code snippet i used:

public void setUp() throws Exception {
setUp("http://www.google.com/", "*chrome");
// We instantiate and start the browser
}

public void testNew() throws Exception {
selenium.open("/");
selenium.type("q", "selenium rc");
selenium.click("btnG");
selenium.waitForPageToLoad("30000");
assertTrue(selenium.isTextPresent("Results * for selenium
rc"));
// These are the real test steps
}

ERROR:

Could not start Selenium session: Internal Server Error
java.lang.RuntimeException: Could not start Selenium session: Internal
Server Error
at
com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:
89)
at
com.thoughtworks.selenium.SeleneseTestBase.setUp(SeleneseTestBase.java:
102)
at
com.thoughtworks.selenium.SeleneseTestCase.setUp(SeleneseTestCase.java:
78)
at first.NewTest.setUp(NewTest.java:29)
at
com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:
212)
Caused by: com.thoughtworks.selenium.SeleniumException: Internal
Server Error
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
97)
at
com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponseAsString(HttpCommandProcessor.java:
168)
at
com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:
104)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
86)
at
com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:
262)
at
com.thoughtworks.selenium.HttpCommandProcessor.start(HttpCommandProcessor.java:
223)

Reply all
Reply to author
Forward
0 new messages