Selenium is not working

7 views
Skip to first unread message

Jmusic

unread,
Sep 5, 2010, 12:17:37 AM9/5/10
to Selenium Users
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

Shaba K

unread,
Sep 5, 2010, 9:56:54 AM9/5/10
to seleniu...@googlegroups.com
Its a time out exception,Try increasing the wait time for now though thats not a good practice is what experts say.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Reply all
Reply to author
Forward
0 new messages