【问题标题】:Appium IOS - element.getAttribute("value") is returning null for XCUIElementTypeTextField although value is presentAppium IOS - element.getAttribute("value") 为 XCUIElementTypeTextField 返回 null,尽管值存在
【发布时间】:2020-04-05 12:41:57
【问题描述】:

我正在使用 React Native 构建的 Appium for iOS 移动应用程序中工作。

在一页中,XCUIElementTypeTextField 是有价值的。但是当我使用 getAttribute("value") 检索它时,它返回 null。



WebElement firstName = MobileBy.iOSClassChain("**/XCUIElementTypeOther[`name == 'First Name'`]/**/XCUIElementTypeTextField[1]");
String actualValue = firstName.getAttribute("value");

我尝试了其他属性,例如:innerText、name、getText()。但没有一个对我有用。其他页面中相同的 XCUIElementTypeTextField 工作正常。仅在此页面中,我遇到了问题。

XCode 版本:11.1
Appium 版本:1.15.1
Appium Java 客户端:7.2.0
硒版本:3.141.59

【问题讨论】:

    标签: selenium-webdriver appium-ios


    【解决方案1】:

    https://github.com/appium/appium/issues/13594
    如上述github问题所述:

    这个问题是已知的,是 XCTest 回归。使用 Xcode 10 SDK 进行测试 iOS 12 及更低版本以及适用于 iOS13 的 Xcode11。

    我的 ios 设备是 12.3.1,我的 xcode 是 11。所以更改为 xcode 10,现在可以正常工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-26
      • 1970-01-01
      • 2016-03-22
      • 1970-01-01
      • 2018-03-09
      • 2012-04-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多