Quality Testing

Quality is delighting customers

Hi All,


I am very new to Selenium RC. 


I facing an issue in running script below.


selenium.type("username", "testuser");

selenium.type("password", "testuser");

selenium.click("link=Login");       // tried to change  selenium.clickAndWait("link=Login");



I am getting error JAVA does not support ClickAndWait command.(If I do not put waitforpageload or ClickAndWait i could not proceed further since my application takes a lot of time to load).


the above script is not working through selenium RC but works fine in selenium IDE.


Could some tell me the reason why it is not working and how to resolve it.


Note : My application loading time is very slow it take lot time to load for click in the page. Please suggest solution for this.




Views: 1832

Reply to This

Replies to This Discussion

All *AndWait methods are available only in Selenium JavaScript API and are accessible from IDE only. Actually you are using a right way - you should call waitForPageToLoad - refer to the JavaDoc http://release.seleniumhq.org/selenium-remote-control/0.9.0/doc/jav...

Hi Sergii,


When i am running test script from eclipse it is running very fast, could you please tell me how to slow it up to see selenium rc debugger window and application window.




Use Thread.sleep(seconds);
To slowdown the execution you should use selenium.setSpeed. You should pass a String that set the millisecond length of a delay which will follow each selenium operation. By default, there is no such delay, i.e., the delay is 0 milliseconds.

selenium.setSpeed("500"); - This will force Selenium to make a half second pause between operations.

You should not use Thread.sleep for this - it will be required to add this call after each operation which will make code unreadable.

Generally you should avoid using Thread.sleep at all. You may see examples when people recommend to use it to "wait" for page to load or to wait for some element to appear. Instead you should use waitForPageToLoad and waitForCondition (with isElementPresent)
--->: Sergi : you are right.. That's a good Usage..


TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service