使用appium从android获取属性

2024-03-29 05:19:57 发布

您现在位置:Python中文网/ 问答频道 /正文

如何使用appium获取android上可用属性的列表? 我试过这种结构

driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
dir(driver.find_element_by_xpath("//*"))

Tags: localhosthttp列表属性remotedriverdircaps
1条回答
网友
1楼 · 发布于 2024-03-29 05:19:57

理想情况下,要使用ign appium获取应用程序上en element的属性值,可以使用以下命令:

el = self.driver.find_element_by_ios_uiautomation('.elements()[0]')
String elName = el.get_attribute('name'))

其中name可以替换为要获得其值的属性。在

相关问题 更多 >