Macros waits but should not.

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

Moderators: Marcia, iOpus, Hannes, iOpus, Tech Support, Tom, iOpus

Macros waits but should not.

Postby kpg on Thu Nov 05, 2009 2:57 pm

I'm scripting an asp.net site, and one of the buttons does a postback that loads the same page with additional info (field) on it.

The line:

TAG POS=1 TYPE=A ATTR=ID:ctl00_cphContent_btnQuote

does the click and the page loads (very fast) but the macro is still waiting for the page to load (even though it already has).

It eventually times out with an error. I suppose I could reduce the timeout and ignore the error, but is there a better way to
tell the player to not wait or to stop waiting without returning an error?

Thanks,
Ken
kpg
 
Posts: 15
Joined: Tue Jun 23, 2009 8:25 am

Re: Macros waits but should not.

Postby Hannes, iOpus on Fri Nov 06, 2009 12:13 am

In case iMacros fails to detect the page being fully loaded, you can use the following workaround:

Code: Select all
'wait only 3 seconds
SET !TIMEOUT 3
'ignore timeout error
SET !ERRORIGNORE YES
' here comes the TAG after which the reload is not detected correctly
TAG POS=1 TYPE=A ATTR=ID:ctl00_cphContent_btnQuote
'reset internal variables to default values
SET !ERRORIGNORE NO
SET !TIMEOUT 60
Hannes, iOpus Support
Hannes, iOpus
 
Posts: 1838
Joined: Thu Sep 21, 2006 6:27 am


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 1 guest