I’ve defined a @Keyword and it works well but there is a small issue.
This is the @Keyword.
--------------------------------------------------------------------------------------------------------------------
@Keyword
**def**
smartWaitAndSendKeysMethod(String toPath, String SendTextKeys) {
TestObject
to = findTestObject(toPath)
**for** (**int** j = 0; j <= 120; j++) {
**if** (WebUI._waitForElementNotPresent_(to, 5) == **false**) {
WebUI._waitForElementPresent_(to, 60)
WebUI._waitForElementVisible_(to, 60)
WebUI._waitForElementClickable_(to, 60)
WebUI._sendKeys_(to, SendTextKeys)
**break**
}
else {
WebUI._comment_('Element >' + toPath + '< is still not
present. Wait.')
WebUI._delay_(1)
}
}
}
--------------------------------------------------------------------------------------------------------------------
Adding an additional @Keyword call in my script source code:
CustomKeywords.‘com.ImprovedWait.NEW_Wait.smartWaitAndSendKeysMethod’(‘REPOSITORY/OBJECT’, “ABC”)
triggs an error:
--------------------------------------------------------------------------------------------------------------------
SCRIPT FAILED because (of) org.codehaus.groovy.runtime.metaclass.MissingMethodExceptionNoStack: No signature of method: com.ImprovedWait.NEW_Wait.smartWaitAndSendKeysMethod() is applicable for argument types: (java.lang.String, com.kms.katalon.core.testdata.InternalData) values: [REPOSITORY/OBJECT, com.kms.katalon.core.testdata.InternalData@22f59fa]
Possible solutions: smartWaitAndSendKeysMethod(java.lang.String, java.lang.String)
--------------------------------------------------------------------------------------------------------------------
as if the Keyword parameters were not defined as java.lang.String which they are.
Hovering over the @Keyword’s String parameters show that they are java.lang.String defined.
HOWEVER: Restarting Katalon makes the error dissapear and the script runs fine until next edit.
Is there something else that must be included or imported to the Script?
Apparently Katalon/Eclipse is reading/updating something vital at start. What?
