Scroll until element is visible iOS UI Automation with xcode7

后端 未结 9 962
小鲜肉
小鲜肉 2021-01-30 10:39

So with the new xcode update apple has revamped the way we do UI testing. In instruments we used java script function \"isVisible\" to determine if our targeted element is visib

9条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-30 11:36

    in swift 4.2, if your element exist at bottom frame of table view or top frame of table view you can use this command to scroll up and scroll down to find element

    let app = XCUIApplication()
    app.swipeUp()
    

    or

    app.swipeDown()
    

提交回复
热议问题