Action
public struct Action<T>
Simulate actions on views or objects
-
Simulate tap on a button
Declaration
Swift
@discardableResult public func tap(event: UIControlEvents = .touchUpInside) -> ActionParameters
eventEvent type to trigger
-
Simulate scroll to a given point
Declaration
Swift
@discardableResult public func scroll(to point: CGPoint, decelerate: Bool = false) -> ActionParameters
toTarget offset value
decelerateEnables deceleration after dragging
-
Simulate scroll to a given page horizontally
Declaration
Swift
@discardableResult public func scroll(horizontalPageIndex index: Int, decelerate: Bool = false) -> ActionParameters
toTarget page index
decelerateEnables deceleration after dragging
-
Simulate scroll to a given page vertically
Declaration
Swift
@discardableResult public func scroll(verticalPageIndex index: Int, decelerate: Bool = false) -> ActionParameters
toTarget page index
decelerateEnables deceleration after dragging
-
Simulate tap on a cell in collection view
Declaration
Swift
@discardableResult public func tap(item: Int, section: Int = 0) -> ActionParameters
itemIndex of an item to tap on
sectionIndex of the section to tap on
-
Simulate tap on a gesture recognizer
Declaration
Swift
@discardableResult public func triggerTap(taps: Int = 1, touches: Int = 1) -> ActionParameters
tapsNumber of taps
touchesNumber of touches
-
Returns all actions and selectors for a gesture recognizer This method uses private API’s and will most likely cause your app to be rejected if used outside of your test target
Declaration
Swift
public func getTargetInfo() -> TargetActionInfoReturn Value
[(target: AnyObject, action: Selector)] Array of action/selector tuples
-
Executes all targets on a specific gesture recognizer
Declaration
Swift
@discardableResult public func execute() -> Action
-
Simulate tap on a cell in table view
Declaration
Swift
@discardableResult public func tap(row: Int, section: Int = 0) -> ActionParameters
rowIndex of the row to tap on
sectionIndex of the section to tap on
Action Struct Reference