Skip to content

Commit

Permalink
Merge pull request #224 from doronz88/bugfix/explorerElements
Browse files Browse the repository at this point in the history
accessibility: fix `elements` property
  • Loading branch information
doronz88 authored Oct 23, 2022
2 parents 116b6ee + fa1b2da commit b8f7a40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/rpcclient/rpcclient/ios/accessibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,9 @@ def traits(self) -> AXTraits:
def elements(self) -> List['AXElement']:
""" get all current displayed elements """
result = []
for element in self.objc_call('explorerElements').py():
result.append(self._client.accessibility.axelement(element))
elements = self.objc_call('explorerElements')
for i in range(elements.objc_call('count')):
result.append(self._client.accessibility.axelement(elements.objc_call('objectAtIndex:', i)))
return result

def insert_text(self, text: str) -> None:
Expand Down

0 comments on commit b8f7a40

Please sign in to comment.