0

I am currently facing the problem that i can't find a way to create a list of all elements and their Valuekeys, of a apk. Is there anyway that can be resolved?

Using the driver.find_elements(by=AppiumBy.CLASS_NAME,value='android.widget') leaves me with an Error message. So there has to be a way to do it with the Finder.

Any help would be appreciated!

FotogyDS
  • 1
  • 2
  • [get_attribute](https://appium.io/docs/en/commands/element/attributes/attribute/), [get_text](https://appium.io/docs/en/commands/element/attributes/text/), you can get a list of elements and then their values in a loop – Dima Berezovskyi Mar 15 '23 at 11:33
  • What if i don't know their Values? I want to be able to gather all elements and their valuekeys on any app without knowing the values of the elements. Is that still possible? – FotogyDS Mar 16 '23 at 07:12
  • that's how I described it to you, you don't know the value of the element, but you know its locator, you take the locator and get its value using the APIs described above – Dima Berezovskyi Mar 16 '23 at 10:50
  • in short: you take a list of elements by a locator [find_elements](https://appium.io/docs/en/commands/element/find-elements/), when you have a list of elements, you go through these elements in a loop and take their values. Then everything depends on the logic you need – Dima Berezovskyi Mar 16 '23 at 10:57
  • Alright, but the way it is used on the website is deprecated, i am not sure where the 'self' infront of the driver comes from. – FotogyDS Mar 16 '23 at 12:54
  • Hey again, i haven't figured out how to loop through the elements and give out their Valueskeys. Could you please send a code example on the method you described? – FotogyDS Mar 20 '23 at 10:23

0 Answers0