问题描述
如何在 UITest 中测试视图的 foregroundColor
?例如,我有一个 Text
:
Text("this can have different colors").foregroundColor(textColor)
在 UITest 中,我想知道文本具有哪种颜色,例如:
XCTAssertEquals(app.staticTexts["..."].color,Color.white)
但是没有字段 .color
。
同样适用于 Image
。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)