Protocols
The following protocols are available globally.
-
This object handles the identifer of the UI elements to test.
Example:
See morefinal class HomeAIP: AIP { static var mainIdentifier: String = "home" } extension HomeAIP { enum Element: String { case mainView case tableView } }
Declaration
Swift
public protocol AccessibilityIdentifierProvider : AnyObject
-
Abstract object to provide a XCUIElement given a specific AIP element.
Example:
See moreextension HomePage: PageObjectUIElementProvider, PageObject { func uiElement(for element: Element, in queryProvider: XCUIElementTypeQueryProvider) -> XCUIElement { let query = self.query(for: element, in: queryProvider) let identifier = HomeAIP.elementIdentifier(for: element) return query[identifier] } private func query(for element: Element, in queryProvider: XCUIElementTypeQueryProvider) -> XCUIElementQuery { switch element { case .mainView: return queryProvider.otherElements case .tableView: return queryProvider.tables } }
Declaration
Swift
public protocol PageObjectUIElementProvider : AnyObject
-
Abstract Page object to provide the default functionality for a concrete Page object.
Attention
None of these methods require a custom implementation. Everything is provided with internal extensions.Declaration
Swift
public protocol PageObject : PageObjectShould, PageObjectWhen
-
Abstract Page object to provide the default functionality for a concrete Page object.
Attention
None of these methods require a custom implementation. Everything is provided with internal extensions.Declaration
Swift
public protocol PageObjectShould : AnyObject
-
Abstract Page object to provide the default functionality for a concrete Page object.
Attention
None of these methods require a custom implementation. Everything is provided with internal extensions.Declaration
Swift
public protocol PageObjectWhen : AnyObject