I use “SourceSearch” to find how many tags I have to open to then use “Times” to open each tag. If “SourceSearch” returns “0” the script throws an error “[error] target must be a positive number”.
Not sure that is intentional but it would be great “Times” command would work with the Target Value “0”.
Here is the code I’m using that is failing when “SourceSearch” returns “)”
{
“Name”: “Scan page”,
“CreationDate”: “2020-4-14”,
“Commands”: [
{
"Command": "sourceSearch",
"Target": "slds-icon-utility-chevronright",
"Value": "myNumberOfClosedTabs"
},
{
"Command": "times",
"Target": "${myNumberOfClosedTabs}",
"Value": ""
},
{
"Command": "click",
"Target": "xpath=//*[@class='icon slds-button__icon slds-icon-utility-chevronright slds-icon_container forceIcon']",
"Value": ""
},
{
"Command": "end",
"Target": "",
"Value": "\\--- OPEN ALL HEALTH CHECK TABS ---/"
}
]
}