当前位置:网站首页>Appium gets the exception of displaying spaces in the middle of object text through XPath

Appium gets the exception of displaying spaces in the middle of object text through XPath

2022-06-22 00:12:00 Spinach in spring

appium, Why can't we find the correct element

//android.view.View[@content-desc=" Show menu All "]

Print all types of objects on the page to by looping List

So you can see

a = self.find_elements(*show_all_button2)
text = FindText(self.driver).find_text('//android.view.View')
L= []
for i in a:
text = i.get_attribute("contentDescription")
L.append(text)
print(L)

  Print the results :

[None,' Show menu \n All ']

原网站

版权声明
本文为[Spinach in spring]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206212223353713.html