browser seems to hang sporadically

31 views
Skip to first unread message

Lisa Crispin

unread,
Feb 3, 2009, 4:31:18 PM2/3/09
to watir-...@googlegroups.com
Has anyone seen this problem running Watir suites in Vista (64-bit) / IE7?

We have a number of Watir suites, plus one big giant suite that includes all the others, the giant one takes maybe 3 hours to run.

I ran this giant suite for 3+ years unattended on XP / IE6 without too much trouble - I'd kick it off when I left for the day. Occasionally a script would get an error I couldn't figure out - it would run fine when I ran it individually. But probably 4 out of 5 times, it ran fine with no errors at all.

It took me quite awhile to get everything working on Vista with the latest Ruby and Watir (1.6.2). If I run the big giant suite, at some point, the browser window just seems to hang - as if it is waiting for it to render. As far as I can tell, this doesn't consistently happen in the same place, it seems pretty random. Usually if I refresh the browser window manually, the suite can continue.

If I run a large suite unattended, it always does that at some point, and of course I'm not here to 'wake it up' again. I thought it was because my Vista and hard drive were sleeping, so I set the sleep setting to 4 hours, but that didn't help much (definitely if the hard drive sleeps while the suites are running they will stop, but they get hung up even if the hard drive doesn't sleep).

My temporary solution is run two suites separately rather than one big one while I am at work, and keep an eye on it so I can tickle it into going again if it hangs. But this is kind of a drag, I can't use the PC really while the scripts are running (I have a Mac and a Linux box to use so that isn't a giant problem but an annoyance). I've spent so much time on this that I have to move on, at least I can run the tests. I'm just wondering if anyone else has experienced the same problem? Is there some better way to run Watir scripts as a regression suite?

thanks,
Lisa

aidy lewis

unread,
Feb 4, 2009, 9:59:58 AM2/4/09
to watir-...@googlegroups.com
Hi Lisa,

2009/2/3 Lisa Crispin <lisa.c...@gmail.com>:


> Has anyone seen this problem running Watir suites in Vista (64-bit) / IE7?
>
> We have a number of Watir suites, plus one big giant suite that includes all
> the others, the giant one takes maybe 3 hours to run.
>
> I ran this giant suite for 3+ years unattended on XP / IE6 without too much
> trouble - I'd kick it off when I left for the day. Occasionally a script
> would get an error I couldn't figure out - it would run fine when I ran it
> individually. But probably 4 out of 5 times, it ran fine with no errors at
> all.
>

We have just written some .Net screenshot code that will activate upon
an exception. I will ask if we can open-source it.

> It took me quite awhile to get everything working on Vista with the latest
> Ruby and Watir (1.6.2). If I run the big giant suite, at some point, the
> browser window just seems to hang - as if it is waiting for it to render. As
> far as I can tell, this doesn't consistently happen in the same place, it
> seems pretty random. Usually if I refresh the browser window manually, the
> suite can continue.
>

Re-open the 'Element' class maybe?

and then

ie.refresh if @browser.text.empty?


> If I run a large suite unattended, it always does that at some point, and of
> course I'm not here to 'wake it up' again. I thought it was because my Vista
> and hard drive were sleeping, so I set the sleep setting to 4 hours, but
> that didn't help much (definitely if the hard drive sleeps while the suites
> are running they will stop, but they get hung up even if the hard drive
> doesn't sleep).
>
> My temporary solution is run two suites separately rather than one big one
> while I am at work, and keep an eye on it so I can tickle it into going
> again if it hangs. But this is kind of a drag, I can't use the PC really
> while the scripts are running (I have a Mac and a Linux box to use so that
> isn't a giant problem but an annoyance). I've spent so much time on this
> that I have to move on, at least I can run the tests. I'm just wondering if
> anyone else has experienced the same problem? Is there some better way to
> run Watir scripts as a regression suite?
>
> thanks,
> Lisa
>
>

Aidy

Peter W

unread,
Feb 21, 2009, 7:13:07 AM2/21/09
to Watir General
I think I'm have a similar problem running on XP with IE 7, Watir
1.6.2 and Ruby 1.8.6

It seems that when I run
browser = Watir::Browser.new

The browser half starts up and then hangs. If I put a print after the
browser new line, it never gets hit.
This problem only happens about one time in 5.

Once it has started it runs fine, but I only do one goto and one link
click, so it's not really a workout.

I haven't found anything written yet that helps with this issue, but
I'm new to ruby and watir, so I may have missed it.

BTW I can't click on the explorer window because it is half visible,
and retains the images of whatever windows you lay across it.



On Feb 5, 1:59 am, aidy lewis <aidy.le...@googlemail.com> wrote:
> Hi Lisa,
>
> 2009/2/3 Lisa Crispin <lisa.cris...@gmail.com>:> Has anyone seen this problem running Watir suites in Vista (64-bit) / IE7?
Reply all
Reply to author
Forward
0 new messages