Forum Discussion

prasad_kumar_s's avatar
prasad_kumar_s
Contributor
12 years ago

Object hierarchy changes with the device

I have 2 android device. Samsung TAB and TAB3. The object hierarchy changes with these two devices. Due to this the script created in one device deosnt run in other. Can anyone please help.



Below is how object is identified in the hierarchy.



Samsung Tab:



NameMapping.Mobile.Device("GT-P3100").Process("com.acs.inurse.ui.activity").RootLayout("").Layout("action_bar_container").ActionBar("action_bar").Layout("NO_ID").Layout("NO_ID").TextView("action_bar_title")



Samsung Tab3

NameMapping.Mobile.Device("SM-T315").Process("com.acs.inurse.ui.activity").RootLayout("").Layout("action_bar_container").ActionBar("action_bar").Layout("NO_ID").Layout("NO_ID", 2).Layout("NO_ID").TextView("action_bar_title") 



Regards

Prasad

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Community Hero
    Hi Prasad,



    I don't know characteristics of these devices, but if they are different (especially as for the screen size/resolution) might it be that this difference is something that is implemented by developers for purpose? E.g. they may use extra screen space for some other data area that required addition of this extra Layout. Have you asked developers if they implemented something like this in application's UI?



    Otherwise, you may consider Extended Find namemapping feature to exclude this optional Layout. (And I would suggest to use not NameMapping but Aliases object.)