我是EarlGrey的初学者。在我使用它们之前,我使用了swift。现在,我的问题是我有一个while循环,我不知道如何在EarlGrey中创建一个while循环。
我希望用EarlGrey编写这个while循环:
if XCUIApplication().otherElements[XYZ].exists { while !XCUIApplication().buttons[Button].exists {
XCUIApplication().otherElements[XYZ].swipeLeft() }
XCTAssertTrue(XCUIApplication().buttons[Button].exists, "Button not exist!") XCUIApplication().buttons[Button].tap()
}非常感谢!
发布于 2017-10-27 18:47:04
if existAccessibilityID(AccessibilityIdentifier:"XYZ") { EarlGrey.select(elementWithMatcher: grey_accessibilityID(Button)).usingSearch(grey_swipeFastInDirection(GREYDirection.left),onElementWith: XYZ})
好了,我找到了一个解决方案……
https://stackoverflow.com/questions/46911010
复制相似问题