Post

Replies

Boosts

Views

Activity

XCUI scroll to element
Has anybody found a good way to scroll to an element?I can do something like the below function. But I am running into situation where a single swipeUp is too much swipe!! It looks like swipeUp is about 1.5 the size in view. So when I swipe up the element I am wanting goes out of view in the top.Any ideas?Thanks!func swipeUpUntilElementFound(app: XCUIApplication, element : XCUIElement, maxNumberOfSwipes : UInt) -> Bool{ if element.exists{ return true } else { for _ in 1...maxNumberOfSwipes{ app.swipeUp() if element.exists{ return true } } return false } }
12
0
22k
Sep ’15