func reorderMovableCellsInATable() {    let videos = app 
.tables[tableName]
.cells.element(boundBy: 0) // cell 0
.buttons[reorderVideos]
let puzzles = app
.tables[tableName]
.cells.element(boundBy: 1) // cell 1
.buttons[reorderPuzzles]
dragAndDrop(start: videos,
destination: puzzles,
duration: 0.5)

let football = app
.tables[tableName]
.cells.element(boundBy: 2) // cell 2
.buttons[reorderFootball]
let reorderedVideos = app
.tables[tableName]
.cells.element(boundBy: 1) // cell 1
.buttons[reorderVideos]
dragAndDrop(start: football,
destination: reorderedVideos,
duration: 0.5)
}
func dragAndDrop(start: XCUIElement,
destination: XCUIElement,
duration: TimeInterval) {
start.press(forDuration: duration,
thenDragTo: destination)
}

--

--

Suparna Khamaru

Suparna Khamaru

I am a Principal SDE in Test, passionate about iOS, Android, Web apps,API test, Automation & ACI— https://www.linkedin.com/in/suparnakhamaru/