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)
}

Automating on WebViews within native apps in iOS using XCTest is lot easier, than in most other mobile automation tools in the market.

The only difference between native commands and WebView commands in XCUITest is the presence and absence of ‘webViews’ between ‘app’ and screen ‘elements’…

app
.webViews
.staticTexts["abc_TextMessage"]
app…