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
}
}
Post
Replies
Boosts
Views
Activity
Curious how people are handling resetting application state in between tests. Thinking I could uninstall the app in the tear down possibly. If others are doing it please share. Thanks!Jim