0

I am using Appium to scrapy some data from an app,

the element xpath is android.view.View[@content-desc="25"] but what i want to get is the value "25". enter image description here For example, the time its shows is 11:25 in Appium , it shows me that el1 = driver.find_element(by=AppiumBy.ACCESSIBILITY_ID, value="25")

However i cannot find this element as it varies from time to time .

Man Man Yu
  • 161
  • 3
  • 13
  • Does the parent element have consistent properties? – Raju Jul 18 '22 at 10:40
  • You can use xpath if the parent element is consistent to get the corresponding child value, which is the same query posted to you by @Raju as above! – Bipin Kumar Chaurasia Jul 19 '22 at 04:11
  • @Raju How can i check which one are the parent element? – Man Man Yu Jul 19 '22 at 04:30
  • @BipinKumarChaurasia can you elaborate more how to use child value ? – Man Man Yu Jul 19 '22 at 04:31
  • http://web.simmons.edu/~grabiner/comm244/weekfour/document-tree.html#:~:text=Parent%20and%20Child,element%20in%20the%20document%20tree. has the information on parent-child elements. https://www.guru99.com/using-contains-sbiling-ancestor-to-find-element-in-selenium.html has information on how to handle them in xpath. – Raju Jul 19 '22 at 06:28

0 Answers0