在 XCUITest 中获取文本 UIColor
我正在从我的 watchOS 项目编写 UI 测试,目前正在寻找如何从 XCUIText 中的 UILabel
和 UIButton
获取 UIColor
属性? 也许有人知道该怎么做?
I am writing UI tests from my watchOS project and currently looking how to fetch UIColor
attribute from from UILabel
and UIButton
in XCUIText?
Maybe someone knows how to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

Xcuitest是色盲。您可以使用快照比较工具,也可以在应用程序存储中使用“可访问性标识符”中的颜色并随着其更改而进行更新。
XCUITest is color-blind. You can either use a snapshot comparison tool or in your application store the color in the accessibility identifier and update it as it changes.