Hi I use page object model in our frame work. Is there any way to slow down the execution speed for each and every line let's say by 0.1 sec. I am looking for some thing like setSpeed() method of selenium Rc.
Asked
Active
Viewed 897 times
1 Answers
0
I would NOT recommend slowing each call down. Those Ajax commands may take longer than 0.1, but just because some of them takes .5 seconds, doesn't mean you should slow every command by .5 seconds.
I have found that writing a variety of wait commands have worked just fine for me. Some of the more useful ones are:
Waiting for JQuery by testing if the following javascript command is true:
return jQuery.active == 0"
Waiting to see if an element exists: (Sorry, I don't know Ruby. Its not too complex of code, so it should be easy to transfer over)
try{
element.isDisplayed()
return true;
}catch(NoSuchElementException e){
return false;
}
You can waiting until a List is of a certain size.
There are other options, but the ones listed above are the ones I've found to be the most useful.

Nathan Merrill
- 7,648
- 5
- 37
- 56
-
Thanks for the information. Actually the way I have designed the frame work is to keep all the operation to be performed in the application separately. So I have just introduced wait along with fluent wait for each of the methods and is working like a charm. This does not slow down the execution of each and every line rather only the operations part. This is what was required. – Vinay Jul 24 '13 at 05:14