Here I am trying to create a Custom keyword and passing TestObject as Parameter and with integer Return type:
public class GetEText { @Keyword public int getErrorText(TestObject oname) { String lname = WebUI.getText(findTestObject(oname)); System.out.println(lname); int noText = Integer.valueOf(lname); System.out.println(noText ); return noText }}
Here i calling the above Keyword from the test case:
int totcText = CustomKeywords.'Katalon.GetEText.getErrorText'(findTestObject('Katalon/label'))
While executing this code i got the below error:
groovy.lang.MissingMethodException: No signature of method:
Possible solutions: findTestObject(java.lang.String), findTestObject(java.lang.String, java.util.Map)
Please share if you have any idea about resolving this Exception, Thanks.