Micro Focus QTP (UFT) Forums

Full Version: UFT Mobile recognize MobileLabel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm using UFT 12.52 Mobile to automate an Android application. I'm trying to obtain the text value of a MobileLabel object, but UFT doesn't recognize it. This are the properties of the object:

"Class Name:=MobileLabel",
"accessibilityid:=",
"bottom:=581",
"class:=Label",
"container:=",
"hint:=",
"ischeckable:=False",
"ischecked:=",
"isclickable:=False",
"isenabled:=True",
"isfocusable:=False",
"isfocused:=False",
"left:=742",
"mcindex:=69",
"nativeclass:=android\.support\.v7\.widget\.AppCompatTextView",
"resourceid:=component_key_text_number_tv",
"right:=776",
"text:=48",
"top:=530"


The only parameters that can be used are: micclass, class, mcindex, nativeclass, resourceid and text. I can't use text because it changes randomly and I don't want to use micclass because this object can be in very different Views, so, the only items that can be used are: micclass, class, nativeclass and resourceid, but, if I use them, UFT doesn't found the item.

To get the text value I user the command lines:

Set objDesc = Description.Create
objDesc("micclass").Value = "MobileLabel"
objDesc("class").Value = "Label"
objDesc("nativeclass").Value = "android.support.v7.widget.AppCompatTextView"
objDesc("resourceid").Value = "component_key_text_number_tv"

Device(...).App(...).MobileObject(objDesc).GetROProperty("text")

What can I do?
With Description.Create can I use an empty parameters? Like accessibilityid? Or container? How?
I have to change the search method of the objects? I see that ChildObjects is not available for UFT Mobile? Is there any other option?

Thanks,
i am trying to install android environment can you guide me how to do that
We are using real devices connected with HP Mobile Center, we aren't using OS simulations.
thank i am using other software for mobile automation