Hi all, hoping someone can help me here with a (seemingly) simple issue.
On a website that I use, it has some javascript that reads like this:
javascript:Update(‘somenumber’, ‘0002’, ‘qr2’, ‘’); return false;
where “somenumber” is a unique ID for an item in the system.
The problem I have is that when I use the below code, it doesn’t work (the website gives a system error):
{
“Name”: “Test”,
“CreationDate”: “2022-9-4”,
“Commands”: [
{
“Command”: “executeScript”,
“Target”: “Update(’${myNumber}’ , ‘0002’, ‘qr2’, ‘’); return false;”,
“Value”: “”,
“Description”: “”
}
]
}
In the above example, the ui.vision variable I created (${myNumber}) contains the correct item number.
When I manually enter the number into the executescript command (ie: do not use a variable to access it), then the execute script works properly on the page (see below).
{
“Name”: “Test”,
“CreationDate”: “2022-9-4”,
“Commands”: [
{
“Command”: “executeScript”,
“Target”: “Update(‘12345’, ‘0002’, ‘qr2’, ‘’); return false;”,
“Value”: “”,
“Description”: “”
}
]
}
Is there some trick to using variables that are created using the “Store” command in ui.vision within an executescript command that I’m missing?