This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/mobile-get-text.html
This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/mobile-get-text.html
Is that possible to setText into an EditText than get the value through this? I am getting an error like âobject not found.â
Use getAttribute method and the object of the getAttribute that you have to give in the parameter need to save in the object repository.
The below example worked for me.
Mobile.setText(findTestObject(âandroid.widget.EditText0 - hhhhhhhhhhhhh (1)â), âshamimâ, 0)
String text= Mobile.getAttribute(findTestObject(âandroid.widget.EditText0 - shamimâ), âtextâ, 5) Mobile.verifyEqual(text, âshamimâ) Mobile.closeApplication()
how can i know the code if i want to get label text on the button in the list view element?
How can I validate the âGet Textâ function inside of .groovy file (Keywords file) I am seeing âgroovy.lang.MissingPropertyException: No such propertyâ exception, please go through with below example
Example:
public class abc {
@Keyword
public void sample(){
txt = Mobile.getText(findTestObject(âObjectLocâ), 0)
Mobile.verifyMatch(txt, âactualTxtâ, false)
}
}