ele.get_attribute("value")无法打印出正确value值

问题:输入框已有默认值,但无法获取

环境1:xcode11.3.1,mac10.14.5,appium1.15.0
测试设备:真机iphone 6s(11.2),iphone 6Plus(12.4.5),

python版本 python3
selenium依赖包版本 3.141.0
appium-python-client版本 0.25

value = ele.get_attribute("value")
text= ele.get_attribute("text")
print(value,text)

另外记录下疑似问题帖子:
[Appium 1.15] getting wrong attribute value for ‘XCUIElementTypeSwitch’ element
https://discuss.appium.io/t/appium-1-15-getting-wrong-attribute-value-for-xcuielementtypeswitch-element/28105

做检查点用,且仅此一个元素,换了检查方式,绕过此问题


版权声明:本文为weixin_43599942原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。