I just started to try Selenium after I got tried with HtmlUnit. I
downloaded Selenium RC, and ran a simple test on my Windows 7 64bit
box with IE8 64bit. I could see the test popped up Selenium Remote
Control window and then the IE 8 window. I saw everything on IE's
window that I was supposed to get from my test. But somehow, the test
could read the data from the IE window, and failed the test sadly.
Could anyone help me out?
My IE's version is 8.0.7600.16835 64-bit Edition;
My OS is Windows 7 64-bit Ultimate Edition.
My Test code:===================================================>>>
public class GoogleFreeTest {
@Test
public void testGoogle() {
int port = 4444;
String browserString = "*iexplore";
String url = "
http://www.google.com/";
Selenium selenium = new DefaultSelenium("localhost", port,
browserString, url);
selenium.start();
selenium.open("/");
selenium.type("q", "selenium rc");
selenium.click("btnG");
selenium.waitForPageToLoad("30000"); //
this line of code fails every time
Assert.assertTrue(selenium.isTextPresent("Results *
for selenium rc"));
selenium.close();
}
}
The error
message:==================================================>>>>>
com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
97)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
91)
at
com.thoughtworks.selenium.DefaultSelenium.waitForPageToLoad(DefaultSelenium.java:
635)
at test.selenium.GoogleFreeTest.testGoogle(GoogleFreeTest.java:26)
... Removed 22 stack frames