PageObjectShould
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.-
Undocumented
Declaration
Swift
associatedtype Element -
thenIShouldSee(text:timeout:)Default implementationCheck if a text is visible in the screen.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldSee(text: String, timeout: TimeInterval?) -> SelfParameters
textText to search in the screen.
timeoutOptional timeout to wait the visibility of the element.
Return Value
itself to use in a chain of calls.
-
thenIShouldSee(element:text:timeout:)Default implementationCheck if an UI element is visible in the screen.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldSee(element: Element, text: String?, timeout: TimeInterval?) -> SelfParameters
elementElement to find in the screen.
textOptional text to check in the UI element.
timeoutOptional timeout to wait the visibility of the element.
Return Value
itself to use in a chain of calls.
-
thenIShouldSee(in:at:cellElement:text:timeout:swipeAction:)Default implementationCheck if a cell is visible in a table view element at a specific index.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldSee(in table: Element, at index: Int, cellElement: Element, text: String?, timeout: TimeInterval?, swipeAction: SwipeAction?) -> SelfParameters
tableTable element to use as parent of the cell.
indexIndex of the cell to find.
cellElementCell element expected (defined in the AIP).
textOptional text visible in the cell.
timeoutOptional timeout to wait the visibility of the element.
swipeActionOptional swipe action to find a not visible cell.
Return Value
itself to use in a chain of calls.
-
thenIShouldSee(in:at:text:timeout:swipeAction:)Default implementationCheck if a table view element has a cell with plain text to a specific index.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldSee(in table: Element, at index: Int, text: String, timeout: TimeInterval?, swipeAction: SwipeAction?) -> SelfParameters
tableTable element to use as parent of the cell.
indexIndex of the cell to find.
textText to find in the cell.
timeoutOptional timeout to wait the visibility of the element.
swipeActionOptional swipe action to find a not visible cell.
Return Value
itself to use in a chain of calls.
-
thenIShouldNotSee(element:delay:)Default implementationCheck if an UI element is not visible in teh screen.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldNotSee(element: Element, delay: TimeInterval?) -> SelfParameters
elementElement to check if it’s not visible.
delayOptional time to wait before checking.
Return Value
itself to use in a chain of calls.
-
thenIShouldSeeNavigationBar(text:timeout:)Default implementationCheck if a navigation bar title is visible in the screen.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldSeeNavigationBar(text: String, timeout: TimeInterval?) -> SelfParameters
textTitle of the navigation bar.
timeoutOptional timeout to wait the visibility of the element.
Return Value
itself to use in a chain of calls.
-
thenIShouldSeeKeyboard()Default implementationCheck if the keyboard is visible.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldSeeKeyboard() -> SelfReturn Value
itself to use in a chain of calls.
-
thenIShouldNotSeeKeyboard()Default implementationCheck if the keyboard is not visible.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldNotSeeKeyboard() -> SelfReturn Value
itself to use in a chain of calls.
-
thenIShouldSeeAlert(title:message:timeout:)Default implementationCheck if an alert is visible.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldSeeAlert(title: String, message: String, timeout: TimeInterval?) -> SelfParameters
titleTitle to find in the alert.
messageMessage to find in the alert
timeoutOptional timeout to wait the visibility of the element.
Return Value
itself to use in a chain of calls.
-
thenIShouldNotSeeAlert()Default implementationCheck if an alert is not visible in the screen.
Default Implementation
Declaration
Swift
@discardableResult func thenIShouldNotSeeAlert() -> SelfReturn Value
itself to use in a chain of calls.
View on GitHub
Install in Dash
PageObjectShould Protocol Reference