Checking page source for particular element's presence


I have been trying to get the source code and check if some keywords are present in it or not.

when trying the below code I can see that the code is received properly but I am not able to do the keywords check on it

import org.openqa.selenium.WebDriver as WebDriver

import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import as Mobile

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint

import com.kms.katalon.core.model.FailureHandling as FailureHandling

import com.kms.katalon.core.testcase.TestCase as TestCase

import com.kms.katalon.core.testdata.TestData as TestData

import com.kms.katalon.core.testobject.TestObject as TestObject

import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint

import internal.GlobalVariable as GlobalVariable

import org.openqa.selenium.Keys as Keys


WebDriver driver = DriverFactory.getWebDriver()

‘Get source code of current page’

def var123 = driver.getPageSource()

WebUI.verifyMatch(var123, ‘html*’, true)

Below is the error that I keep getting:

Matching actual text '<meta content="Let the matches begin! Celebrate :soccer: around the

Based on my observation from your result: ‘html*’ should be ‘<html*’

Thanks for the reply Vinh. But this is also not working. I tried using var123.contains(’’). That is returning success always. IS there any other way in which i can check if the source has the text ‘html in it’?