Hi ,
I am currently learning selenium RC. I tried to run my
junit selenium
test case, it opens two firefox windows and then wait for the web page
http://localhost:4444/selenium-server/core/Blank.html?start=true on one of the windows and eventually times out.
The web page intended to open also doesnt open.
Please let me know the issue.
SELENIUM SERVER LOG :
22:45:36.145 INFO - Command request: getNewBrowserSession[*firefox,
http://www.g
oogle.com/, ] on session null
22:45:36.145 INFO - creating new remote session
22:45:36.145 INFO - Allocated session 9d0e1f4b80854fd3a02c6b048f621e65 for http:
//www.google.com/, launching...
22:45:36.192 INFO - Preparing Firefox profile...
22:45:38.380 INFO - Launching Firefox...
22:45:40.489 INFO - Got result: OK,9d0e1f4b80854fd3a02c6b048f621e65 on session 9
d0e1f4b80854fd3a02c6b048f621e65
22:45:40.489 INFO - Command request: open[/, ] on session 9d0e1f4b80854fd3a02c6b
048f621e65
22:46:10.613 INFO - Got result: Timed out after 30000ms on session 9d0e1f4b80854
fd3a02c6b048f621e65
22:46:10.613 INFO - Command request: testComplete[, ] on session 9d0e1f4b80854fd
3a02c6b048f621e65
22:46:10.613 INFO - Killing Firefox...
22:46:10.769 INFO - Got result: OK on session 9d0e1f4b80854fd3a02c6b048f621e65
My Junit Code
// We specify the package of our tests
import com.thoughtworks.selenium.*;
// This is the driver's import. You'll use this for instantiating a
// browser and making it do what you need.
public class HelloSeleniumTest extends SeleneseTestCase {
// We create our Selenium test case
public void setUp() throws Exception {
setUp("http://www.google.com/", "*firefox");
// 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
}
}
Thanks,
Divya