Replace of string

Hello,
I am new to this stuff, only programmed VBA before.
Maybe someone could help me. I read the forum for hours and tried everything…

This works NOT: (Macro encountered some error)

{
  "Command": "storeText",
  "Target": "xpath=//*[@id=\"animals\"]/div[4]/div[2]/div/div/div/div/div/div",
  "Value": "suche"
},
{
  "Command": "executeScript_Sandbox",
  "Target": "var d = ${suche}; m = d.replace(\"Ra\",\"Ma\"); return m",
  "Value": "new"
}

The correct value is in “suche” after the first step.

If I run only this, it works.

{
“Command”: “executeScript_Sandbox”,
“Target”: “var d = “Raindeer”; m = d.replace(“Ra”,“Ma”); return m”,
“Value”: “new”
}

I think it have someting to do with the way I am working with the variable, but dont get it :frowning:

Thank you!!!

If you do an echo ${suche} does it return your expected value?

It is solved. Just had to start the Makro from the beginning. If I try to run the command only it dont work.

Tanks!