【发布时间】:2020-08-23 09:32:00
【问题描述】:
问题:对于“XCUIElementTypeTextField”元素(在 iOS 13 及更高版本上),当我尝试 Element.GetAttribute("value" )我得到“”。 请查看附件截图和页面来源
我试图获取页面源,甚至页面源不包含“XCUIElementTypeTextField”的值。
但是,当我在具有 12.4.1 操作系统的设备上尝试时,它工作得非常好,并在检查器和页面源中显示值。
我想知道是否有人面临同样的问题?
配置: * 出现问题的 Appium 版本(或 git 修订版):1.17.0 * 用于运行 Appium 的桌面操作系统/版本:macOS Catalina,10.15.4 * Npm 或 Yarn 包管理器: * 移动平台/测试版本:iOS * 真实设备或模拟器/模拟器:真实设备(iPhone X 13.4.1) * Java 客户端:7.3.0 * Xcode:11.4 * 设备操作系统:13.4.1
页面源代码段:
</XCUIElementTypeStaticText>
</XCUIElementTypeOther>
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" x="16" y="159" width="343" height="75">
**<XCUIElementTypeTextField type="XCUIElementTypeTextField" enabled="true" visible="true" x="16" y="161" width="343" height="53" label="" value="">
</XCUIElementTypeTextField>**
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" x="28" y="159" width="50" height="30" name="Username" label="Username">
<XCUIElementTypeStaticText type="XCUIElementTypeStaticText" enabled="true" visible="true" x="28" y="167" width="50" height="14" name="Username" label="Username" value="Username">
</XCUIElementTypeStaticText>
</XCUIElementTypeOther>
</XCUIElementTypeOther>
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" x="16" y="232" width="343" height="75">
<XCUIElementTypeSecureTextField type="XCUIElementTypeSecureTextField" enabled="true" visible="true" x="16" y="234" width="343" height="53" label="" value=" ">
</XCUIElementTypeSecureTextField>
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" x="28" y="232" width="49" height="30" name="Password" label="Password">
<XCUIElementTypeStaticText type="XCUIElementTypeStaticText" enabled="true" visible="true" x="28" y="240" width="49" height="14" name="Password" label="Password" value="Password">
【问题讨论】:
标签: ios13 appium-ios xcuitest appium-desktop