我刚刚在 xCode 上完成了 Earlgrey 的设置。设置进行得很顺利,但是当我添加小代码片段进行测试时,它会引发此错误
Swift Compiler Error Group
Cannot find 'grey_keyWindow' in scope
Cannot find 'grey_tap' in scope
Cannot find 'grey_sufficientlyVisible' in scope
这是编写的简单测试代码
func testExample() throws {
// UI tests must launch the application that they test.
let app = XCUIApplication()
app.launch()
EarlGrey.selectElement(with: grey_keyWindow()).perform(grey_tap())
.assert(grey_sufficientlyVisible())
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
我可以尝试什么来解决这个问题?