How can I test the foregroundColor
of a View in an UITest? I have a Text
for example:
Text("this can have different colors").foregroundColor(textColor)
And in the UITest I want to know which color the Text has, something like:
XCTAssertEquals(app.staticTexts["..."].color, Color.white)
But there is no field .color
.
The same should work for Image
s.
question from:
https://stackoverflow.com/questions/65940890/test-foregroundcolor-of-view 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…