What is better to use: WaitForCondition(string arg0) or Wait() in Selenium?
The two methods WaitForCondition(string arg0) and Wait() vary in their efficiency in terms of speed.
I prefer to use WaitForCondition(string arg0) or WaitForPageToLoad(string arg0,string arg1). The reason is that the wait interval of Wait() function is limited by the value specified as an argument. And the wait interval is always fixed. So we’ll not save time if the server response was fast because the method will always wait for a fixed interval.
For example, if we say Wait(3000), it will wait for 3 seconds regardless of the speed of browser rendering. On the other hand, the other two methods check if the condition is met every small fraction of a second. And this way the wait interval is elastic and will accommodate to the speed of browser rendering.
1 Comment:
-
6/23/2009 3:55 PM
I got the solution from your idea. Thank you for this post and also i have to thank macrotesting www.macrotesting.com from there i got lot of information and your post also helped me in getting the solution. Thank you...


