Open TimurNurlygayanov opened 6 years ago
found the workaround - remember Y position of each element at first initialisation of menu page, after some clicks poco starts to return wrong Y coords of the elements.
I am not sure what your hierarchy looks like. Is that the bounding box displayed properly in your hierarchy viewer?
If your menu items list vertically, it cannot be the same Y position.
Archive.zip Example of menu in uiautomatorviewer ^^^ After we clicking to any menu item and return back, poco can't properly detect position of these elements (some of them, and it is strange).
Are you using AirtestIDE or just writing codes in your own editor? It seems that everything is OK in dump_1276712053355129766.uix.
I'm testing native Android application with text menu, and trying to iterate via every menu item.
The problem with poco in the following:
poco(text='menu item text').click()
this code sometimes doesn't click anything (but sometimes works fine).
The following code:
sometimes clicking wrong elements, because get_position() method returns the same Y value for two different menu items.
What we can use to properly click the item if poco lib detects it on the view? How to properly detect the Y position of item? Why sometimes it works, but sometimes - no? (for the same app&menu)