05-06-2016, 05:04 PM
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'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,