Hello!
I would like to ask for help because I want to verify that the default value of the input text field is correct. I used this syntax WebUI.getAttribute(findTestObject(‘Shopping_Cart/Quantity_Textbox’), 1), and I got an error below.
This is the actual UI
=============== ROOT CAUSE =====================
For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================
10-16-2021 12:27:09 PM getAttribute(findTestObject(“Shopping_Cart/Quantity_Textbox”), 1)
Elapsed time: 0.208s
Test Cases/TC-002 FAILED.
Reason:
groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.getAttribute() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject, java.lang.Integer) values: [TestObject - ‘Object Repository/Shopping_Cart/Quantity_Textbox’, …]
Possible solutions: getAttribute(com.kms.katalon.core.testobject.TestObject, java.lang.String), getAttribute(com.kms.katalon.core.testobject.TestObject, java.lang.String, com.kms.katalon.core.model.FailureHandling)
at TC-002.run(TC-002:66)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:430)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:421)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:400)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:392)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:273)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:142)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1634358373663.run(TempTestCase1634358373663.groovy:25)