facebook / idb

idb is a flexible command line interface for automating iOS simulators and devices
https://fbidb.io
MIT License
4.55k stars 436 forks source link

accessibility id #543

Open tobiasqfs opened 5 years ago

tobiasqfs commented 5 years ago

Description

I am writing a JavaClient that uses Protocol Buffers. I need to get accessibility infos from the application so I am sending a AccessibilityInfoRequest.

But I only get the following infos: "AXUniqueId": 125312912, "AXFrame": "{{278.66666666666669, 170.33333333333334}, {127.33333333333331, 30}}", "AXLabel": "Tough button", "type": "Button", "traits": ["Scrollable", "Button"], "AXPid": 0

I found that this message is send by the SimulatorBridge: accessibilityElementsWithDisplayId

And it does not return the data I need. Where can I find the documentation for this method or how can I get the accessibility id of the elements?

zeyadsalloum commented 5 years ago

Unfortunately this is a private Apple api so it is not documented. which id are u missing. there's an id in the output you pasted

tobiasqfs commented 5 years ago

Thanks for your answer!

I nee the "Accessibility Identifier" Th component has the following values:

Bildschirmfoto 2019-08-06 um 10 47 25

And the API gives me this output:

{ "AXHint": "theHint", "AXPid": 0, "traits": ["Scrollable", "Button"], "AXFrame": "{{278.66666666666669, 170.33333333333334}, {127.33333333333331, 30}}", "type": "Button", "AXLabel": "toughButtonLabel", "AXUniqueId": 57429264 },

So the Hint and the Label are passed but not the Identifier.

Appium also uses idb right?

Here they have the accessibility id:

appium-desktop-screen-inspector

muehlbaueralex commented 5 years ago

Hey @zeyadsalloum, would be great to be able to retrieve accessibility ids - I'll try to find some time to have a look at it.

Currently with using appium+WDA we built a whole framework using ACC IDs. So I wonder how you interact with elements at facebook? Is it all pixel-based using the coordinates for tapping?