I’m getting this error when trying to run a test using a newly created ‘login()’ method to cycle through a list of usernames and passwords defined in a data table (i.e. spreadsheet).
Here’s my code:
def login(def userName, def password)
{
WebUI.setText(findTestObject(‘input_UserName’), userName)
WebUI.setText(findTestObject('input_Password'), password)
}
login(findTestData(‘Execute Automation Test Data’).getValue(‘UserName’, row), findTestData(“Execute Automation Test data”).getValue(“Password”))
And here’s the error message I see on the console:
Test Cases/Execute Automation Test Case FAILED because (of) groovy.lang.MissingMethodException: No signature of method: com.kms.katalon.core.testdata.reader.SheetPOI.getValue() is applicable for argument types: (java.lang.String) values: [Password]
Possible solutions: getValue(java.lang.String, int), getValue(int, int), getClass(), getType(), getAt(java.lang.String)
Am I missing some sort of import?
If I don’t use the login() method the test runs fine.
Here’s my code for logging into the site and passing a username and password:
WebUI.setText(findTestObject(‘input_UserName’), findTestData(‘Execute Automation Test Data’).getValue(‘UserName’, row))
WebUI.setText(findTestObject(‘input_Password’), findTestData(‘Execute Automation Test Data’).getValue(‘Password’, row))