Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Watin Timeout Problem in loading webpage

leave a comment »

I was working with watin library and got problem of timeout in loading some page. Actually I am using following code for url

ie.goto(“mywebsite.com”);

But as my site is heavy, this object land up with the timeout exception. I have searched the watin website and found out that there is nothing right now for setting timeout property for ie object or webpage loading object. They are planning to give the functionality in 1.0.0 version. But somewhere I found the following workaround:

try
{
      ie.goto(“mywebsite.com”);
}
catch(WatiN.Core.Exceptions.TimeoutException)
{
IE.AttachToIE(Find.ByUrl(new System.Text.RegularExpressions.Regex(“.*mysite.*”)),60);
}

Hope they release 1.0.0 soon…:-)

Advertisements

Written by Manish

January 18, 2007 at 1:33 pm

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

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

%d bloggers like this: