PageObjectWhen
public protocol PageObjectWhen : 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 -
whenTap(element:coordinates:timeout:swipeAction:)Default implementationPerforms a tap in a element.
Default Implementation
Declaration
Swift
@discardableResult func whenTap(element: Element, coordinates: CGPoint?, timeout: TimeInterval?, swipeAction: SwipeAction?) -> SelfParameters
elementElement to tap.
coordinatesOptional coordinates to perform the tap inside the element.
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.
-
whenTapCell(in:at:timeout:swipeAction:)Default implementationPerforms a tap inside a cell.
Default Implementation
Declaration
Swift
@discardableResult func whenTapCell(in tableView: Element, at index: Int, timeout: TimeInterval?, swipeAction: SwipeAction?) -> SelfParameters
tableViewTable view where to find the cell.
indexIndex of the cell to tap
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.
-
whenTap(coordinates:)Default implementationPerforms a tap in the screen to a specific coordinate.
Default Implementation
Declaration
Swift
@discardableResult func whenTap(coordinates: CGPoint) -> SelfParameters
coordinatesLocation to tap.
Return Value
itself to use in a chain of calls.
-
whenTapBackButton()Default implementationPerforms a tap in the back button of a navigation controller.
Default Implementation
Declaration
Swift
@discardableResult func whenTapBackButton() -> SelfReturn Value
itself to use in a chain of calls.
-
whenTapAlertButton(at:timeout:)Default implementationPerforms a tap in an alert view button.
Default Implementation
Declaration
Swift
@discardableResult func whenTapAlertButton(at index: Int, timeout: TimeInterval?) -> SelfParameters
indexIndex of the button to tap.
timeoutOptional timeout to wait the visibility of the element.
Return Value
itself to use in a chain of calls.
-
whenTapActionSheetButton(at:timeout:)Default implementationPerforms a tap in an action sheet button.
Default Implementation
Declaration
Swift
@discardableResult func whenTapActionSheetButton(at index: Int, timeout: TimeInterval?) -> SelfParameters
indexIndex of the button to tap.
timeoutOptional timeout to wait the visibility of the element.
Return Value
itself to use in a chain of calls.
-
whenType(_:in:shouldReplace:timeout:swipeAction:)Default implementationPerforms a typing inside an UI element.
Default Implementation
Declaration
Swift
@discardableResult func whenType(_ text: String, in element: Element, shouldReplace: Bool, timeout: TimeInterval?, swipeAction: SwipeAction?) -> SelfParameters
textText to type.
elementElement where to type the text.
shouldReplaceReplace the current text of the element. Default true.
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.
-
whenSelectDatePicker(wheels:timeout:)Default implementationPerforms the pick of a date from a date picker.
Default Implementation
Declaration
Swift
@discardableResult func whenSelectDatePicker(wheels: [String], timeout: TimeInterval?) -> SelfParameters
wheelsThe day, month and year to pick. (The order depends on the format of your date picker).
timeoutOptional timeout to wait the visibility of the element.
Return Value
itself to use in a chain of calls.
-
whenAcceptLocationRequest()Default implementationPerforms the tap on the GPS permission request of iOS.
Default Implementation
Declaration
Swift
@discardableResult func whenAcceptLocationRequest() -> SelfReturn Value
itself to use in a chain of calls.
-
whenSwipe(_:timeout:)Default implementationPerforms a swipe in the screen.
Default Implementation
Declaration
Swift
@discardableResult func whenSwipe(_ swipeAction: SwipeAction, timeout: TimeInterval?) -> SelfParameters
swipeActionSwipe action to perform.
timeoutOptional timeout to wait the visibility of the element.
Return Value
itself to use in a chain of calls.
-
whenSlide(element:toNormalizedSliderPosition:timeout:)Default implementationPerforms a scroll in a scrollable view.
Default Implementation
Declaration
Swift
@discardableResult func whenSlide(element: Element, toNormalizedSliderPosition: CGFloat, timeout: TimeInterval?) -> SelfParameters
elementScrollable element to scroll.
toNormalizedSliderPositionPosition where to scroll.
timeoutOptional timeout to wait the visibility of the element.
Return Value
itself to use in a chain of calls.
View on GitHub
Install in Dash
PageObjectWhen Protocol Reference