Macro that can accept either of two TAGs

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
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
Pap
Posts: 10
Joined: Fri Sep 19, 2014 12:18 pm

Macro that can accept either of two TAGs

Post by Pap » Wed Oct 29, 2014 11:05 am

Imacros10
windows7

i have a website that can respond in 2 ways after we enter some csv data into the form.
is it possible to make a macro that will continue with the test when either of the 2 texts appear?

like for example:

Code: Select all

TAG POS=1 TYPE=LI FORM=NAME:form_login ATTR=TXT:*Login<SP>has<SP>failed.*
TAG POS=1 TYPE=LI FORM=NAME:form_login ATTR=TXT:*Login<SP>is<SP>incorrect.*
i hear that adding:

Code: Select all

SET !ERRORIGNORE YES
SET !TIMEOUT_TAG 0
will solve the problem but it wont, errorignore YES will simply ignore the missing tag and if both of them are missing that wont solve it
Snayler
Posts: 12
Joined: Wed Mar 26, 2014 2:12 pm

Re: Macro that can accept either of two TAGs

Post by Snayler » Thu Oct 30, 2014 11:01 am

Code: Select all

TAG POS=1 TYPE=LI FORM=NAME:form_login ATTR=TXT:*Login<SP>* EXTRACT=TXT
There ya go. You can extract the text and check if it has some normal text ("login is incorrect"/"login has failed") or the "#EANF#" string ("Extraction Anchor Not Found"). Use javascript for that.
Pap
Posts: 10
Joined: Fri Sep 19, 2014 12:18 pm

Re: Macro that can accept either of two TAGs

Post by Pap » Sat Nov 01, 2014 7:05 pm

that will not help because there are lots of *Login* texts on this page and they have different styles (the 2 ones i want to verify also)
Post Reply