Search code examples
imacros

IF and ELSE - IMACROS


TAG POS=1 TYPE=A ATTR=TXT:next
FRAME F=1
WAIT SECONDS=3
TAG POS=1 TYPE=A ATTR=TXT:Contact
FRAME F=0
WAIT SECONDS=7

How do I insert a condition in ATTR: Contact?

I would check if the open page has Contact link, Contact us link , Help link, etc.

If the page does not have any of the links go to the end


Solution

  • As a workaround you may try the !ERRORIGNORE variable. Something like this:

    TAG POS=1 TYPE=A ATTR=TXT:next
    FRAME F=1
    WAIT SECONDS=3
    
    SET !ERRORIGNORE YES
    TAG POS=1 TYPE=A ATTR=TXT:Contact
    SET !ERRORIGNORE NO
    
    FRAME F=0
    WAIT SECONDS=7