Verify element property value between two values

Hi All,

I’m trying to perform Verify element property value between two values, so something like this:
‘Verify element property value: referencePoint’
WS. verifyElementPropertyValue (ServiceOrderResponse, ‘data.serviceOrder.statusDetail.referencePoint’, (‘11’|‘12’)

So what I need to do is to verify wether the element property value is 11 or 12.
Thanks in advance.


WS.verifyElementPropertyValue keyword does not support a match with RegExp. Alternatively, you can implement it yourself using java.util.regex.Pattern an d java.util.regex.Matcher.

import java.util.regex.Matcher
import java.util.regex.Pattern
import com.kms.katalon.core.util.KeywordUtil
String value = data.serviceOrder.statusDetail.referencePoint
Pattern pattern = Pattern.compile("(11|12)")
Matcher matcher = regexPat.matcher(value)
if (matcher.find()) {
    String result =
    println result
else {
    KeywordUtil.markFailed('not found.')