JSON of my macro that 100% reproduces the problem. Email and password have been scrubbed. The error happens on the ‘else’ clause around line 90.
{
"CreationDate": "2018-8-10",
"Commands": [
{
"Command": "open",
"Target": "https://www.heb.com/my-account/login?DPSLogout=true",
"Value": ""
},
{
"Command": "verifyElementPresent",
"Target": "link=Log Out",
"Value": ""
},
{
"Command": "if",
"Target": "${!LastCommandOK}",
"Value": ""
},
{
"Command": "click",
"Target": "link=Log Out",
"Value": ""
},
{
"Command": "endif",
"Target": "",
"Value": ""
},
{
"Command": "open",
"Target": "https://www.heb.com/my-account/login/",
"Value": ""
},
{
"Command": "type",
"Target": "id=login-email",
"Value": "example@email.com"
},
{
"Command": "type",
"Target": "id=reg-password",
"Value": "ExamplePassword"
},
{
"Command": "clickAndWait",
"Target": "id=login-submit",
"Value": ""
},
{
"Command": "label",
"Target": "SELECTION_LOOP",
"Value": ""
},
{
"Command": "open",
"Target": "https://www.heb.com/digital-coupon/coupon-selection/",
"Value": ""
},
{
"Command": "store",
"Target": "0",
"Value": "couponCount"
},
{
"Command": "while",
"Target": "(${couponCount} < 30)",
"Value": ""
},
{
"Command": "assertElementPresent",
"Target": "link=Select Coupon",
"Value": ""
},
{
"Command": "if",
"Target": "${!LastCommandOK}",
"Value": ""
},
{
"Command": "click",
"Target": "link=Select Coupon",
"Value": ""
},
{
"Command": "echo",
"Target": "Selected coupon",
"Value": ""
},
{
"Command": "else",
"Target": "",
"Value": ""
},
{
"Command": "echo",
"Target": "All coupons claimed. Exiting",
"Value": ""
},
{
"Command": "endif",
"Target": "",
"Value": ""
},
{
"Command": "storeEval",
"Target": "${couponCount}+1",
"Value": "couponCount"
},
{
"Command": "endWhile",
"Target": "",
"Value": ""
},
{
"Command": "gotoLabel",
"Target": "SELECTION_LOOP",
"Value": ""
}
]
}