IF and ELSE - IMACROS

2019-09-13 23:54发布

问题:

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

回答1:

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


标签: imacros