jaya_kiran
5 years agoOccasional Contributor
Sub : how to do regular expression assertions for variable elements in an array
Description : Trying to write an assertion for fields code and unit.
code can be an integer or empty
and unit can be a string or empty.
i.e code and unit has no fixed values.
And have to assert based on assertion using regex.
the assertion have to match all the object properties in the response array.
[
{
"code": "0",
"unit": "meter"
},
{
"code": "1",
"unit": "meter"
},
{
"code": "2",
"unit": "meter"
},
{
"code": "",
"unit": ""
}
]
If you mean stopping automation, then see Runner Object (Runner.Stop Method), which is used to control script execution.