Need to verify text contains particular text in a String

In my Test Case I have following snippet:

WebUI.openBrowser(GlobalVariable.G_SiteURL)
def text = WebUI.getText(findTestObject('Page_CuraHomepage/btn_MakeAppointment'))
WebUI.verifyMatch(text, '^Make Appo.*', true, FailureHandling.STOP_ON_FAILURE)

see verifyMatch https://docs.katalon.com/display/KD/[Common]+Verify+Match

6 Likes