Unable to check if a text is contained within a html element

So I used the 2 lines below for my checkpoint to see if a certain text exists within a recorded html element**:

def ChkPnt = WS.sendRequest(findTestObject(‘Contract Summary/ChkPntCollectionMethod_hte’))

WS.containsString(ChkPnt, CollectionMethod, false)**

And below is the error I keep on getting:

Test Cases/Quick Capture/Std_QC_Add Premium Payer_S FAILED because (of) groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords.sendRequest() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject) values: [TestObject - ‘Object Repository/Contract Summary/ChkPntCollectionMethod_hte’]
Possible solutions: sendRequest(com.kms.katalon.core.testobject.RequestObject), sendRequest(com.kms.katalon.core.testobject.RequestObject, com.kms.katalon.core.model.FailureHandling)

2 Likes

Sello Matloha said:

So I used the 2 lines below for my checkpoint to see if a certain text exists within a recorded html element**:

def ChkPnt = WS.sendRequest(findTestObject(‘Contract Summary/ChkPntCollectionMethod_hte’))

WS.containsString(ChkPnt, CollectionMethod, false)**

And below is the error I keep on getting:

Test Cases/Quick Capture/Std_QC_Add Premium Payer_S FAILED because (of) groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords.sendRequest() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject) values: [TestObject - ‘Object Repository/Contract Summary/ChkPntCollectionMethod_hte’]
Possible solutions: sendRequest(com.kms.katalon.core.testobject.RequestObject), sendRequest(com.kms.katalon.core.testobject.RequestObject, com.kms.katalon.core.model.FailureHandling)

Hi

I am facing the same issue - any update?

Thank you
Andrew

The message is saying that your code is doing:

sendRequest(com.kms.katalon.core.testobject.TestObject)

but Katalon is saying you should do

sendRequest(com.kms.katalon.core.testobject.RequestObject)

You can see the difference, don’t you?