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?) -> Self
Parameters
text
Text to search in the screen.
timeout
Optional 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?) -> Self
Parameters
element
Element to find in the screen.
text
Optional text to check in the UI element.
timeout
Optional 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?) -> Self
Parameters
table
Table element to use as parent of the cell.
index
Index of the cell to find.
cellElement
Cell element expected (defined in the AIP).
text
Optional text visible in the cell.
timeout
Optional timeout to wait the visibility of the element.
swipeAction
Optional 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?) -> Self
Parameters
table
Table element to use as parent of the cell.
index
Index of the cell to find.
text
Text to find in the cell.
timeout
Optional timeout to wait the visibility of the element.
swipeAction
Optional 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?) -> Self
Parameters
element
Element to check if it’s not visible.
delay
Optional 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?) -> Self
Parameters
text
Title of the navigation bar.
timeout
Optional 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() -> Self
Return 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() -> Self
Return 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?) -> Self
Parameters
title
Title to find in the alert.
message
Message to find in the alert
timeout
Optional 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() -> Self
Return Value
itself to use in a chain of calls.