Appium Webdriver io accessibility id iteration children elements

I am using Appium/webdriver io setup.
Can anyone help me?
I cannot figure out how to iterate through child elements of some parent elements if I search by accessibility id. Let’s say I have some element with accessibility id “~table”. This element has several children elements (with different accessibility ids). And I want to iterate through all of them (one by one) and let’s say get text of each of them.
I know how to do it usinx xpath or predicate strategies. But how to do it if let’s say the only search strategy I can use is accessibility id.
Seems it is impossible?


you talking about ios?
why not use iOSClassChain. example:

// java
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeOther[`name == \"~table\"`]/**/XCUIElementTypeStaticText[`name == \"your_other_id\"`]/")
// or select second '~table' and third 'your_other_id'
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeOther[`name == \"~table\"`][2]/**/XCUIElementTypeStaticText[`name == \"your_other_id\"`][3]/")

PS only correct element types

Yes, ios.
I want to use iOS and Android in one project. So if I want to reuse some selectors and code in iOS and Android I need to search by accessibility id.

Is it possible to do it using accessibility id?

With java simplest is Desktop browser tests possible

Our company uses Appium/WebdriverIO/Javascript bundle, so I have to stick to that.
So it seems to be impossible to iterate through all children elements of the element that I search for by using accessibility id strategy?