Skip to end of metadata
Go to start of metadata

Description

Verify if two strings match each other, the second string can be a regular expression.

Parameters 

ParameterParameter TypeMandatoryDescription
actualText Stringrequiredthe object represents for a HTTP Response, user can get responded content type, data, header properties (sometime user may want to get cookie from response header)
expectedText String requiredthe text you want to look for
isRegex Boolean requiredindicate whether the text is a regular expression
flowControlFailureHandling optionalspecify failure handling schema to determine whether the execution should be allowed to continue or stop. More details is in this page: Failure handling

Returns

  • true, if two given strings match each other; otherwise, false.

Example

You want to verify if the text "Katalon" matches with the regular expression "(K|T)atalon".

WS.verifyMatch('Katalon', '(K|T)atalon', true)

 

 

  • No labels
Write a comment…