on not found handling

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.
Post Reply
jiri

on not found handling

Post by jiri » Thu Oct 13, 2005 2:54 pm

i have following problem:

on page 1 (e.g. http://www.worldlakes.org/lakedetails.asp?lakeid=8509) there is fix label "lake region" and it's dynamic data

on next page(e.g. http://www.worldlakes.org/lakedetails.asp?lakeid=10182), there is no label and no data.

Using relativ extraction search, i first go to the label:
TAG POS=1 TYPE=TD ATTR=TXT:Lake<SP>Region*
then i extract with
EXTRACT POS=R1 TYPE=TXT ATTR=<TD>*
i also use "go on on error":
SET !ERRORIGNORE YES

And as result, the macro can find in first record correct value, but in the second record it went to wrong field instead of writing in Extraction #EANF#.

So: how can i programaticly write:
search and go to label and extract it's dynamic data if you found label, but if there is no label (on error search) extract #EANF# (instead of wrong extraction)?
Thank you.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Thu Oct 13, 2005 8:23 pm

The new version V5.0 handles this automatically, so your macro code works in V5.0 without further changes :)

Code: Select all

VERSION BUILD=5001014    
TAB T=1     
TAB CLOSEALLOTHERS     
'
URL GOTO=http://www.worldlakes.org/lakedetails.asp?lakeid=8509 
SIZE X=801 Y=603    
TAG POS=1 TYPE=TD ATTR=TXT:Lake<SP>Region*   
EXTRACT POS=R1 TYPE=TXT ATTR=<TD>*   
'=> lake details extracted
'
URL GOTO=http://www.worldlakes.org/lakedetails.asp?lakeid=10182   
SET !ERRORIGNORE YES
TAG POS=1 TYPE=TD ATTR=TXT:Lake<SP>Region*   
EXTRACT POS=R1 TYPE=TXT ATTR=<TD>*  
'=> EANF message because no lake details on this page 
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Thu Oct 13, 2005 8:26 pm

You can contact our support for the V5.0 Beta version
Post Reply