That will not work, because the synchronization is waiting to finish
before advancing to the next step/line of code.


The only way to do it is add a refresh within the synchronization that
will happen after a period of time.


Thanks though





From: watir-general@googlegroups.com
[mailto:watir-gene...@googlegroups.com] On Behalf Of Wesley Chen
Sent: Tuesday, March 24, 2009 10:23 AM
To: watir-general
Subject: [wtr-general] Re: Synchronization Points


Suppose there are two browsers, one is ie1, another is ie2, the separate
You may achieve it by:

Wesley Chen.

2009/3/24 Darin Duphorn <dduph...@redbrickhealth.com>


Within this synchronization, is there a way to handle issues where the
page doesn't fully load?  (insert a page refresh after a certain time?)

We have a situation where if a separate browser maybe opened in IE 7.0
and the automation is running on the an active browser the page doesn't
fully load and the automation hangs.  We have to click refresh the page
and then the automation continues.

When I run a full regression, I do close all browsers before starting,
and I don't run it the issue, but when we build the test it can be a



-----Original Message-----
From: watir-general@googlegroups.com
[mailto:watir-gene...@googlegroups.com] On Behalf Of Bret Pettichord
Sent: Tuesday, March 24, 2009 10:04 AM
To: watir-general@googlegroups.com
Subject: [wtr-general] Re: Synchronization Points

Watir has built in synchronization. Most Watir methods will not return
until the page has finished loading. This is invisible and automatic and

handles 95% of the synchronization needs of Web Apps.

When Watir was first released, there were browser drivers in several
different languages. The most popular was Samie, in Perl. But Watir was
the first to include this automatic synchronization mechanism. I suspect

that this was key to its success. Because it is invisible and automatic,

most people don't give it much thought.

A little history lesson for you.


vladimir...@hotmail.com wrote:
> In comercial tools, like QuickTest Pro, there are API for
> synchronization points.
> You may wait for a certain time while the page is downloded before
> performing any operations on it.
> The API ranges from simple wait() to more sophisticated functions
> waiting for specific object properties.
> Do we have analogs for synchronization points in Watir?
> Do we need to create a loop checking if the web page contains some
> text to guarantee it downloaded?
> So far I did not insert any synchronization points in the scripts and
> everything worked fine.
> >

Bret Pettichord
CTO, WatirCraft LLC, www.watircraft.com
Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog <http://www.io.com/%7Ewazmo/blog> 
Twitter, www.twitter.com/bpettichord

Watir Training: Austin March 25-26, Portland/Beaverton April 16-17

You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to