使用Appium IOS自动化的Java:使用的无障碍标识获取元素? [英] Appium IOS automation using Java : get element using accessibility Id?
问题描述
我是新来的IOS自动化使用appium。我可以访问元素和使用XPath这样做自动化
<$p$p><$c$c>driver.findElement(By.xpath(\"//UIAApplication[1]/UIAWindow[2]/UIASecureTextField[3]\")).click();我想访问使用特定的辅助标签名称的元素。当使用appium检查我可以看到,辅助功能名称是参数下显示的值。但如何使用Java code访问这个值?
感谢。
您应该能够使用findElementByAccessibilityId(字符串使用)方法在Java中。它更多资讯:
的http://appium.github.io/java-client/io/appium/java_client/FindsByAccessibilityId.html
I am new to IOS automation using appium. I can access elements and do automation using XPath like this
driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[2]/UIASecureTextField[3]")).click();
I would like to access elements using the accessibility label name given. When using the appium inspector I can see that the accessibility name is displayed under the parameter Value . But How to access this value using Java code?
Thanks.
You should be able to use the findElementByAccessibilityId(String using) method in Java. More info on it here:
http://appium.github.io/java-client/io/appium/java_client/FindsByAccessibilityId.html
这篇关于使用Appium IOS自动化的Java:使用的无障碍标识获取元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!