Tested this and get same outcome in firefox - UI 9.1.9 seems like they are getting turned into an array instead as a workaround you could call the array number ${TESTOBJECT[2]} or use an older version of Ui.V if it was working before. Ill add what code i tested with below.
{
"Name": "test for",
"CreationDate": "2024-5-7",
"Commands": [
{
"Command": "comment",
"Target": "Test 1",
"Value": "",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "var testObject = {};\ntestObject.testdata = 'this is test data';\ntestObject.testdata2 = 'this is another data';\ntestObject.testdata3 = 'this is another data again';\nreturn testObject;",
"Value": "testObject",
"Description": ""
},
{
"Command": "echo",
"Target": "${testObject}",
"Value": "",
"Description": ""
},
{
"Command": "echo",
"Target": "${testObject.testdata2}",
"Value": "",
"Description": ""
},
{
"Command": "echo",
"Target": "${TESTOBJECT[2]}",
"Value": "",
"Description": ""
},
{
"Command": "comment",
"Target": "Test 2",
"Value": "",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return { name: 'John', age: 30 };",
"Value": "person",
"Description": ""
},
{
"Command": "echo",
"Target": "${person.name}",
"Value": "",
"Description": ""
}
]
}
Logs
-
Playing macro test for
-
[info]
Executing: | comment | Test 1 | |
Executing: | executeScript_Sandbox | var testObject = {}; testObject.testdata = ‘this is test data’; testObject.testdata2 = ‘this is another data’; testObject.testdata3 = ‘this is another data again’; return testObject; | testObject |
Executing: | echo | ${testObject} | |
this is test data,this is another data,this is another data again
Executing: | echo | ${testObject.testdata2} | |
undefined
Executing: | echo | ${TESTOBJECT[2]} | |
this is another data again
Executing: | comment | Test 2 | |
Executing: | executeScript_Sandbox | return { name: ‘John’, age: 30 }; | person |
Executing: | echo | ${person.name} | |
undefined
Macro completed (Runtime 2.84s)