When you perform testing through any automation testing tool then you also want to see that how your application works with that but it’s not possible with tools. Because mostly all tools are working in milliseconds that’s why we are not able to see real time functions. For this requirement most testing tools uses “wait” or synchronization function. But when I was working on Watir then I faced one problem that, how can I wait ruby script then I discussed my problem with my Ruby Programmer (Rahul). He suggest me to use sleep statement for waiting the script and found it really works. Thanks to Rahul!

So you can also use sleep statement for waiting the script in Watir.

Syntax :-

# Sleep for 6 seconds

sleep 6 (Always use small latter for defining the Variable in Watir script)

Advertisements

One thought on ““Sleep” statement in Watir

  1. Hi,
    I really thanks. I was not able to run my project’s whole scripts in one time. This statenents help me much more.

    Thanks,
    Regards
    Shivraj Jadhav

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s