In XCTest UI Testing, how to check the background color of button, label , views?

走远了吗. 提交于 2019-12-04 05:14:14

XCTest is for functional testing, rather than asserting visual requirements.

To test requirements such as background color, use a unit test to initialize the view controller in question and check the view's background color there. You don't need to rely on image comparison, and unit tests are a lot faster.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!