0
我有一个问题,我使用表视图的底部刷新,但只有第一次正常工作。刷新表格后,我的测试已经结束。有我的代码:如何在UI测试中使用表格的视图底部刷新两次?
func test_lista(){
//Entrar a la lista de ofertas
app.tables.element(boundBy: 0).cells.element(boundBy: 2).tap()
sleep(2)
//Arrastrar la ultima fila
app.swipeUp()
app.swipeUp()
let cell = app.tables.element(boundBy: 0).cells.element(boundBy: 2)
let start = cell.coordinate(withNormalizedOffset: CGVector(dx: 0,dy: 0))
let finish = cell.coordinate(withNormalizedOffset: CGVector(dx: 0,dy: -30.0))
start.press(forDuration: 0, thenDragTo: finish)
app.swipeUp()
app.swipeUp()
let cell2 = app.tables.element(boundBy: 0).cells.element(boundBy: 4)
let start2 = cell2.coordinate(withNormalizedOffset: CGVector(dx: 0,dy: 0))
let finish2 = cell2.coordinate(withNormalizedOffset: CGVector(dx: 0,dy: -30.0))
start2.press(forDuration: 0, thenDragTo: finish2)
}
我在做什么错?