Skip to content

Commit

Permalink
Update swipe actions documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
treatwell-ignasurbonas committed Feb 5, 2020
1 parent e91cb5a commit 8db9622
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions TWUITests/Helpers/XCUIElement+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,48 +45,48 @@ public extension XCUIElement {
}

/**
Scroll up in scroll view until XCUIElement is found or maximum swipe
Scroll Up in scroll view until XCUIElement is found or until maximum number of swipes is reached
Parameters:
- element: XCUIElement in scroll view to be found
- maxSwipes: maximum swipe up actions
- maxSwipes: maximum swipe actions
Return:
true if element was found while swiping up
true if element was found while swiping
*/
func swipeUp(to element: XCUIElement, maxSwipes: UInt = 5) -> Bool {
find(element: element, maxActions: maxSwipes, action: self.swipeUp() )
}

/**
Scroll Left in scroll view until XCUIElement is found or maximum swipe
Scroll Left in scroll view until XCUIElement is found or until maximum number of swipes is reached
Parameters:
- element: XCUIElement in scroll view to be found
- maxSwipes: maximum swipe up actions
- maxSwipes: maximum swipe actions
Return:
true if element was found while swiping up
true if element was found while swiping
*/
func swipeLeft(to element: XCUIElement, maxSwipes: UInt = 5) -> Bool {
find(element: element, maxActions: maxSwipes, action: self.swipeLeft() )
}

/**
Scroll Right in scroll view until XCUIElement is found or maximum swipe
Scroll Right in scroll view until XCUIElement is found or until maximum number of swipes is reached
Parameters:
- element: XCUIElement in scroll view to be found
- maxSwipes: maximum swipe up actions
- maxSwipes: maximum swipe actions
Return:
true if element was found while swiping up
true if element was found while swiping
*/
func swipeRight(to element: XCUIElement, maxSwipes: UInt = 5) -> Bool {
find(element: element, maxActions: maxSwipes, action: self.swipeRight() )
}

/**
Scroll down in scroll view until XCUIElement is found or maximum swipe
Scroll Down in scroll view until XCUIElement is found or until maximum number of swipes is reached
Parameters:
- element: XCUIElement in scroll view to be found
- maxSwipes: maximum swipe up actions
- maxSwipes: maximum swipe actions
Return:
true if element was found while swiping up
true if element was found while swiping
*/
func swipeDown(to element: XCUIElement, maxSwipes: UInt = 5) -> Bool {
find(element: element, maxActions: maxSwipes, action: self.swipeDown() )
Expand Down

0 comments on commit 8db9622

Please sign in to comment.