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)
}
我在做什麼錯?