|
|
|
|
|
Swipe the screen to search for an element.
Direction: Direction to swipe
Offset: Swipe offset
Zone: Select Zone
Element to find: Select Element to find
Delay: Time to wait before sending a command (in milliseconds)
Rounds: Maximum swipe rounds
Click: Boolean
True: click on the element once it is found
False: Will only make the element visible
Scenario: We will use the imdb movie data application.
To swipe the screen of the ”Movies” to select “Best Picture Winners” option and then to click on it.
Parameters:
Direction: Down
Offset: 100
Swipe Time: 2000
Zone: NATIVE
Element to find: xpath=//*[@text='Best Picture Winners']
Element to find index: 0
Delay: 1000
Rounds: 5
Click: true
Once found it will be clicked
if(client.swipeWhileNotFound("Down", 0, 2000, "NATIVE", "xpath=//*[@text='Best Picture Winners']", 0, 1000, 5, true)){// If statement}if(client.SwipeWhileNotFound("Down", 0, 2000, "NATIVE", "xpath=//*[@text='Best Picture Winners']", 0, 1000, 5, true)){// If statement}If StrComp (client.SwipeWhileNotFound ( "Down", 0, 2000, "NATIVE", "xpath=//*[@text='Best Picture Winners']", 0, 1000, 5, true ), "True") = 0 Then Report'If statementElse ReportEnd Ifif(self.client.swipeWhileNotFound2("Down", 0, 2000, "NATIVE", "xpath=//*[@text='Best Picture Winners']", 0, 1000, 5, True)):# If statementpassif($client->swipeWhileNotFound2("Down", 0, 2000, "NATIVE", "xpath=//*[\@text='Best Picture Winners']", 0, 1000, 5, 1)){# If statement}