[error] Internal variable "!URL" not supported


#1

““A similar command from the old Firefox is “storeLocation”. It is useful to store current selected window’s URL. This command can be recreated in the Kantu IDE by using store | {!URL} | myurl or simply using the [{!URL} built-in variable](https://a9t9.com/kantu/docs#internalvar) directly in your software test cases.””

Trying to replicate the above:

get the error : " [error]

Internal variable “!URL” not supported"

but I am using the code from the example pages

{
  "Command": "storeEval",
  "Target": "${!URL}",
  "Value": "website address"
}

]
}


#2

Where did you find this example code? It is wrong :wink:

Correct:

  • Option 1: store | ${!URL} | w1 (recommended)

  • Option 2: storeEval | a = "${!URL}"; a | w2 (note the “” around the variable)

macro code:

    {
      "Command": "store",
      "Target": "${!URL}",
      "Value": "w1"
    },
    {
      "Command": "storeEval",
      "Target": "a = \"${!URL}\"; a",
      "Value": "w2"
    },

#3

Thanks!

I tried this one >> Option 1: store | ${!URL} | w1 (recommended)

Here is my JSON:

" {
“Command”: “store”,
“Target”: “${!URL}”,
“Value”: “w1”
}
]
}"

Still does not work >> [error] Internal variable “!URL” not supported

I copied the code, so its exact as far as I can see.