3

Im trying to compare some values from variables with value from extraction to click something

First block:

SET !VAR2 EVAL(
    "var text1=\"{{!EXTRACT}}\";
    if (text1==\"{{!VAR6}}\") {
        text1 = \"tr_answer1\";
    } else if (text1==\"{{!VAR7}}\") {
       text1 = \"tr_answer2\";
    } else if (text1==\"{{!VAR8}}\") {
        text1 = \"tr_answer3\";
    } else text1 = \"tr_answer4\";text1;"
)

and after:

TAG POS=1 TYPE=TR ATTR=ID:{{!VAR2}}

VAR2 should return one of values like tr_answer1 or others. But it not works correctly. It always return tr_answer4 from ELSE statement.

Someone knows what im doing wrong? I can't find syntax of correct else if statement with JS in iMacros.

Im sure that one of values from variables is equal to extracted value

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Hipeq
  • 31
  • 2

0 Answers0