getText/getAttribute Error, whats happend here?

this is the script that i used and where i have the problem

Mobile.getText(findTestObject(‘pruebaussd/android.widget.TextView0 - MOVISTARSu saldo es Bs.S 6.46, su bono es de Bs.S 0.00. Sus Cupos Voz Fijo FULL 1+ 60 MIN, VOZ Mov FULL 1+ 57 MIN, VOZ otras Ope FULL 1+ 56 MIN, SMS FULL 1+ 89 SMS,…1: Siguiente’, 0))

and this are the error.

Test Cases/prueba4 FAILED because (of) (Stack trace: groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.testobject.ObjectRepository.findTestObject() is applicable for argument types: (java.lang.String, java.lang.Integer) values: [pruebaussd/android.widget.TextView0 - MOVISTARSu saldo es Bs.S 6.46, su bono es de Bs.S 0.00. Sus Cupos Voz Fijo FULL 1+ 60 MIN, VOZ Mov FULL 1+ 57 MIN, VOZ otras Ope FULL 1+ 56 MIN, SMS FULL 1+ 89 SMS,…1: Siguiente, …]

Also y use this code:

Mobile.getAttribute(findTestObject(‘pruebaussd/android.widget.TextView0 - MOVISTARSu saldo es Bs.S 6.46, su bono es de Bs.S 0.00. Sus Cupos Voz Fijo FULL 1+ 60 MIN, VOZ Mov FULL 1+ 57 MIN, VOZ otras Ope FULL 1+ 56 MIN, SMS FULL 1+ 89 SMS,…1: Siguiente’),‘text’,5)

and nothing work

Hi Jesus,

It looks like your parenthesis are in the wrong place. The error is telling your that there is not matching method with those 2 parameters. Unfortunately, since it’s hard to see the code of the Katalon libraries, it’s hard to tell what is going on.

In your case, the “0” parameter should be on Mobile.getText(), not on findTestObject():

Mobile.getText(findTestObject('pruebaussd/android.widget.TextView0 - MOVISTARSu saldo es Bs.S 6.46, su bono es de Bs.S 0.00. Sus Cupos Voz Fijo FULL 1+ 60 MIN, VOZ Mov FULL 1+ 57 MIN, VOZ otras Ope FULL 1+ 56 MIN, SMS FULL 1+ 89 SMS,...1: Siguiente'), 0)

Or for a shorter example:

Mobile.getText(findTestObject('My Object'), 0)

For your call to Mobile.getAttribute(), you’re passing the correct parameters.

I find that looking at the Katalon docs and API spec can be helpful:

https://docs.katalon.com/

https://api-docs.katalon.com/

Hope this helps,

Chris