Slide 41
Slide 41 text
Adding to the enum
@kthomas901
dotSwift2020
extension AppUI {
var isWithinTableCell: Bool {
return XCUIApplication().tables.cells.buttons[self.rawValue].exists
}
var element: XCUIElement {
if self.isStaticText {
return XCUIApplication().staticTexts[self.rawValue]
} else if self.isTextField {
return XCUIApplication().textFields[self.rawValue]
} else if self.isWithinTableCell {
return XCUIApplication().tables.cells.buttons[self.rawValue]
}
fatalError()
}
}