# DrawPattern

> Draws a path marked by multiple points on the device screen. The points that create the path are
recorded from the path of the finger on the device screen. You can add multiple finger
paths to simulate screen interactions that involve multiple fingers.

Draws a path marked by multiple points on the device screen. The points that create the path are
recorded from the path of the finger on the device screen. You can add multiple finger
paths to simulate screen interactions that involve multiple fingers.

## Definition

**Namespace**: UiPath.MobileAutomation.API.Models

**Assembly**: UiPath.MobileAutomation.API (in UiPath.MobileAutomation.API.dll)

## Overloads

| Overload | Description |
| --- | --- |
| `DrawPattern(FingerPath, CoordinatesTypeEnum, PressTypeEnum, float, MobileOptions.DrawPatternOptions)` | Draws a single path marked by multiple points on the device screen. |
| `DrawPattern(List<FingerPath>, CoordinatesTypeEnum, PressTypeEnum, float, MobileOptions.DrawPatternOptions)` | Draws multiple paths marked by multiple points on the device screen. Suitable for scenarios where the user performs an action that requires two finger on the device screen. |

## `DrawPattern(FingerPath, CoordinatesTypeEnum, PressTypeEnum, float, MobileOptions.DrawPatternOptions)`

Draws a single path marked by multiple points on the device screen.

```
DrawPattern(
	    FingerPath fingerPath,
	    CoordinatesTypeEnum coordinatesType = CoordinatesTypeEnum.DeviceIndependentPixels,
	    PressTypeEnum pressType = PressTypeEnum.ShortPress,
	    float waitTime = 0f,
	    MobileOptions.DrawPatternOptions options = null
```

`fingerPath` [FingerPath](https://docs.uipath.com/activities/other/latest/ui-automation/uipath-mobileautomation-api-models-fingerpath)
:   All the points recorded from the path of the finger on the device screen, on
    a X-Y axis. Visit [FingerPath Class](https://docs.uipath.com/activities/other/latest/ui-automation/uipath-mobileautomation-api-models-fingerpath) to learn how to create the finger path, using the
    `FingerPath Constructor` and `FingerPath
    Methods`, part of the `FingerPath` class.

`coordinatesType` `CoordinatesTypeEnum` (Optional)
:   Specifiy the coordinates of the finger as an
    `CoordinatesTypeEnum` object for the **ElementExists**
    API. Default value is null. The available types are:

    * `PhysicalPixels`
    * `DeviceIndependentPixels`

`pressType` `PressTypeEnum` (Optional)
:   Specify the press type for the `CoordinatesTypeEnum` inputted
    above for the above parameter. Default value is
    `CoordinatesTypeEnum.DeviceIndependentPixels`. The types
    of press you can use are:

    * `ShortPress`
    * `LongPress`

`waitTime` [Float](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types) (Optional)
:   The time (in milliseconds) that you wait for a point in the finger path to
    complete.
    :::tip
    To work as expected, the
    `waitTime` should be higher than `0`
    for **iOS** devices.
    :::

`options` [MobileOptions.DrawPatternOptions](https://docs.uipath.com/activities/other/latest/ui-automation/uipath-mobileautomation-api-models-mobileoptions-drawpatternoptions) (Optional)
:   Specify the `MobileOptions.DrawPatternOptions` for the
    `DrawPattern` action. Default value is null.

## `DrawPattern(List<FingerPath>, CoordinatesTypeEnum, PressTypeEnum, float, MobileOptions.DrawPatternOptions)`

Draws multiple paths marked by multiple points on the device screen. Suitable for
scenarios where the user performs an action that requires two finger on the device
screen.

```
DrawPattern(
	    List<FingerPath> fingerPaths,
	    CoordinatesTypeEnum coordinatesType = CoordinatesTypeEnum.DeviceIndependentPixels,
	    PressTypeEnum pressType = PressTypeEnum.ShortPress,
	    float waitTime = 0f,
	    MobileOptions. DrawPatternOptions options = null
)
```

`fingerPaths` **`List<FingerPath>`**
:   A list of finger paths created by multiple fingers on a screen, on a X-Y
    axis (for example, in a zoom-in or zoom-out scenario, the user touches the
    screen with two fingers in order to perform the action). Visit [FingerPath Class](https://docs.uipath.com/activities/other/latest/ui-automation/uipath-mobileautomation-api-models-fingerpath) to
    learn how to create the finger path, using the `FingerPath
    Constructor` and `FingerPath Methods`, part of
    the `FingerPath` class.

`coordinatesType` `CoordinatesTypeEnum` (Optional)
:   Specify the coordinates of the finger as an
    `CoordinatesTypeEnum` object for the **ElementExists**
    API. Default value is null.

`pressType` `PressTypeEnum` (Optional)
:   Specify the press type for the `CoordinatesTypeEnum` inputted
    above for the above parameter. Default value is
    `PressTypeEnum.ShortPress`. The types of press you can
    use are:

    * `ShortPress`
    * `LongPress`

`waitTime` [Float](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types) (Optional)
:   The time (in milliseconds) that you wait for a point in the finger path to
    complete.
    :::tip
    To work as expected, the
    `waitTime` should be higher than `0`
    for **iOS** devices.
    :::

`options` [MobileOptions.DrawPatternOptions](https://docs.uipath.com/activities/other/latest/ui-automation/uipath-mobileautomation-api-models-mobileoptions-drawpatternoptions) (Optional)
:   Specify the `MobileOptions.DrawPatternOptions` for the
    `DrawPattern` action. Default value is null.
