Page tree
Skip to end of metadata
Go to start of metadata

Supported in iOS Supported in Android

Description

Swipe the screen to search for an element. 

Parameters

Usage

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:

Once found it will be clicked

Code Examples

Java Example
if(client.swipeWhileNotFound("Down", 0, 2000, "NATIVE", "xpath=//*[@text='Best Picture Winners']", 0, 1000, 5, true))
{
// If statement
}
C# Example
if(client.SwipeWhileNotFound("Down", 0, 2000, "NATIVE", "xpath=//*[@text='Best Picture Winners']", 0, 1000, 5, true))
{
// If statement
}
VBScript Example
If StrComp (client.SwipeWhileNotFound ( "Down", 0, 2000, "NATIVE", "xpath=//*[@text='Best Picture Winners']", 0, 1000, 5, true ), "True") = 0 Then
     Report
'If statement
Else
     Report
End If
Python Example
if(self.client.swipeWhileNotFound2("Down", 0, 2000, "NATIVE", "xpath=//*[@text='Best Picture Winners']", 0, 1000, 5, True)):
# If statement
pass
Perl Example
if($client->swipeWhileNotFound2("Down", 0, 2000, "NATIVE", "xpath=//*[\@text='Best Picture Winners']", 0, 1000, 5, 1)){
# If statement
}
  • No labels