Wildcard question - sometimes ID, sometimes ID others NAME

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 search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
BigLarry
Posts: 2
Joined: Wed Dec 15, 2010 9:30 am

Wildcard question - sometimes ID, sometimes ID others NAME

Post by BigLarry » Wed Dec 15, 2010 9:36 am

I can't seem to find if this is supported with wildcards but sometimes I'm faced with:

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:TITLE CONTENT=Mycontent

and others it is

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:TITLE CONTENT=MyContent


So I've tried bundling the two together with:

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=*:TITLE CONTENT=MyContent

But it didn't like that. Is there anyway to take care of either instance wrapped into the one line?

Thanks.
Tom, Tech Support
Posts: 3529
Joined: Mon May 31, 2010 4:59 pm

Re: Wildcard question - sometimes ID, sometimes ID others NA

Post by Tom, Tech Support » Fri Dec 17, 2010 5:01 pm

Hi BigLarry,

As you discovered, the type of wildcard substitution you are attempting is not supported. However, an alternative method would be to try both tags and just ignore the error if one fails:

Code: Select all

SET !ERRORIGNORE YES
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=NAME:TITLE CONTENT=Mycontent
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:TITLE CONTENT=MyContent
SET !ERRORIGNORE NO
Have you tried to record with expert mode to see if there is another combination of unique attribute values you can use?
Regards,

Tom, iMacros Support
Post Reply