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

ElementSwipe (Zone, Element, Index, Direction, Offset, Time)

Supported in iOS Supported in Android

Description

Swipe the screen in a given direction. The command will only perform the swipe within a given container.

Parameters

Usage

Command usage:  Equivalent command to the swipe command. This command will swipe inside a container and not the entire screen.

Scenario:

We will use the Amazon application to swipe the menu down.

Note that the menu does not hold on the entire screen so on different devices, we may get different behavior.

Parameters:

  • Zone: will be set to "NATIVE"
  • Element: will be set to "id=browse_menu"
  • Index: will be set to "0"
  • Direction: will be set to "DOWN"
  • Offset: will be set to "500"
  • Time: will be set to "1000"


Code Examples

Java Example
client.elementSwipe("NATIVE", "id=browse_menu", 0, "Down", 500, 1000);
C# Example
client.ElementSwipe("NATIVE", "id=browse_menu", 0, "Down", 500, 1000);
VBScript Example
client.ElementSwipe "NATIVE", "id=browse_menu", 0, "Down", 500, 1000
Report
Python Example
self.client.elementSwipe("NATIVE", "id=browse_menu", 0, "Down", 500, 1000)
Perl Example
$client->elementSwipe("NATIVE", "id=browse_menu", 0, "Down", 500, 1000);
  • No labels