For “regular” TestObjects, I’m able to access the properties programmatically.
Here is some test code, that works fine with the “regular” TestObjects. Excuse the code quality. It’s just some test code for printing out the data to the log.
I’m having a challenge getting the various properties for a “Mobile” TestObject. When I call this function for a “Mobile” TestObject, I’m not able to access many of the properties. The main property that I’m trying to get out of the object is the selector (e.g. if XPATH, I want to get the actual XPATH string).
Any help would be highly appreciated? I’ve been stuck with this issue for too long.
I modified the Object Repository/Application/android.widget.TextView - Graphics a bit. Its Locator Strategy was given as “Attribute”. I changed it to “XPATH” because @crisf wanted to see XPATH. See the screenshot.
Result
I ran the test case and got the following output in the console
2024-05-17 21:43:50.380 INFO com.kms.katalon.core.util.KeywordUtil - locator=//*[@class = 'android.widget.TextView' and (@text = 'Graphics' or . = 'Graphics') and @resource-id = 'android:id/text1']
2024-05-17 21:43:50.397 INFO com.kms.katalon.core.util.KeywordUtil - strategy=XPATH