在 XCUITest 中获取文本 UIColor

发布于 01-17 09:58 字数 139 浏览 7 评论 0原文

我正在从我的 watchOS 项目编写 UI 测试,目前正在寻找如何从 XCUIText 中的 UILabelUIButton 获取 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

┼──2025-01-24 09:58:11

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文