UiPath Documentation
activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

用户界面自动化活动

上次更新日期 2026年5月8日

DrawPattern

在设备屏幕上绘制由多个点标记的路径。 根据手指在设备屏幕上的路径记录创建路径的点。 您可以添加多个手指路径,以模拟涉及多个手指的屏幕交互。

定义

命名空间:UiPath.MobileAutomation.API.Models

程序集:UiPath.MobileAutomation.API(在 UiPath.MobileAutomation.API.dll 中)

重载

重载描述
DrawPattern(FingerPath, CoordinatesTypeEnum, PressTypeEnum, float, MobileOptions.DrawPatternOptions)在设备屏幕上绘制由多个点标记的单个路径。
DrawPattern(List<FingerPath>, CoordinatesTypeEnum, PressTypeEnum, float, MobileOptions.DrawPatternOptions)在设备屏幕上绘制由多个点标记的多条路径。 适用于用户执行需要用两根手指在设备屏幕上操作的场景。

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

在设备屏幕上绘制由多个点标记的单个路径。

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

fingerPath手指路径:在 XY 轴上,从手指在设备屏幕上的路径记录的所有点。请访问手指路径类,了解如何使用FingerPath ConstructorFingerPath MethodsFingerPath类的一部分)创建手指路径。

coordinatesType CoordinatesTypeEnum (可选):将手指坐标指定为ElementExists API 的CoordinatesTypeEnum对象。默认值为 null。可用类型包括:

* `PhysicalPixels`
* `DeviceIndependentPixels`
* `PhysicalPixels`
* `DeviceIndependentPixels`

pressType PressTypeEnum (可选):为上面为上述参数输入的CoordinatesTypeEnum指定压力类型。默认值为CoordinatesTypeEnum.DeviceIndependentPixels 。您可以使用的压力机类型包括:

* `ShortPress`
* `LongPress`
* `ShortPress`
* `LongPress`

waitTime浮点(可选):等待手指路径中的点完成的时间(以毫秒为单位)。:::提示要按预期工作, iOS设备的waitTime应高于0 。:::

options MobileOptions.DrawPatternOptions (可选):为DrawPattern操作指定MobileOptions.DrawPatternOptions 。默认值为 null。

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

在设备屏幕上绘制由多个点标记的多条路径。 适用于用户执行需要用两根手指在设备屏幕上操作的场景。

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

fingerPaths List<FingerPath> :屏幕上多个手指在 XY 轴上创建的手指路径列表(例如,在放大或缩小场景中,用户用两个手指触摸屏幕执行操作)。请访问手指路径类,了解如何使用FingerPath ConstructorFingerPath MethodsFingerPath类的一部分)创建手指路径。

coordinatesType CoordinatesTypeEnum (可选):将手指的坐标指定为ElementExists API 的CoordinatesTypeEnum对象。默认值为 null。

pressType PressTypeEnum (可选):为上面为上述参数输入的CoordinatesTypeEnum指定压力类型。默认值为PressTypeEnum.ShortPress 。您可以使用的压力机类型包括:

* `ShortPress`
* `LongPress`
* `ShortPress`
* `LongPress`

waitTime浮点(可选):等待手指路径中的点完成的时间(以毫秒为单位)。:::提示要按预期工作, iOS设备的waitTime应高于0 。:::

options MobileOptions.DrawPatternOptions (可选):为DrawPattern操作指定MobileOptions.DrawPatternOptions 。默认值为 null。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新