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

用户界面自动化活动

上次更新日期 2026年4月23日

MobileOptions.TapOptions 类

使用此类以进一步配置Tap API。

定义

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

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

语法

public class TapOptions : TargetOptions
public class TapOptions : TargetOptions

MobileOptions.TapOptions类型公开以下成员。

构造函数

public TapOptions()
public TapOptions()

MobileOptions.TapOptions :初始化MobileOptions.TapOptions类的新实例。

属性

ContinueOnError Boolean - 指定在方法引发错误时是否应继续自动化。此参数仅支持布尔值,例如truefalse 。默认值为false 。因此,如果该参数为空且活动引发错误,系统将停止执行项目。如果该值设为true ,则无论出现何种错误,系统都将继续执行项目。

DelayAfter :执行方法之后的延迟时间(以秒为单位)。默认值为0.3秒。

DelayBefore :方法开始执行任何操作之前的延迟时间(以秒为单位)。默认值为0.2秒。

tapOffset点击偏移:设置目标元素的参数。

* `Position` - Choose the default positioning of
  the anchor point.
* `Type` - Choose how to set the target coordinates. You can choose the
  following:
  + `PhysicalPixels` - Use this option for
    workflows using a single device. Since the indication
    corresponds to actual pixels on the screen, it's different
    for each device.
  + `DeviceIndependentPixels` - Use this
    option to run workflows on devices with similar density
    screens. Device-independent pixels means that you are
    indicating a target based on the pixel density of the
    selected screen area.
* `OffsetX` - Horizontal displacement of the
  targeted area chosen for `Type`.
* `OffsetY` - Vertical displacement of the
  targeted area chosen for `Type`.
* `Position` - Choose the default positioning of
  the anchor point.
* `Type` - Choose how to set the target coordinates. You can choose the
  following:
  + `PhysicalPixels` - Use this option for
    workflows using a single device. Since the indication
    corresponds to actual pixels on the screen, it's different
    for each device.
  + `DeviceIndependentPixels` - Use this
    option to run workflows on devices with similar density
    screens. Device-independent pixels means that you are
    indicating a target based on the pixel density of the
    selected screen area.
* `OffsetX` - Horizontal displacement of the
  targeted area chosen for `Type`.
* `OffsetY` - Vertical displacement of the
  targeted area chosen for `Type`.

Timeout :指定等待时间(以秒为单位),如果超出该时间后活动并未运行,系统便会抛出错误。默认值为30秒。

tapOffset

语法

属性值: TapOffsetModel

使用此属性设置目标元素的参数。

  • Position - 选择锚点的默认位置。
  • Type - 选择如何设置目标坐标。 您可以选择以下选项:
    • PhysicalPixels - 对于使用单个设备的工作流,请使用此选项。 由于该指示对应于屏幕上的实际像素,因此每台设备的指示都不同。
    • DeviceIndependentPixels - 使用此选项可在屏幕密度相似的设备上运行工作流。 设备独立像素表示您根据所选屏幕区域的像素密度指定目标。
  • OffsetX ”- 为“ Type ”选择的目标区域的水平位移。
  • OffsetY ”- 为“ Type ”选择的目标区域的垂直位移。
public TapOffsetModel tapOffset { get; }
public TapOffsetModel tapOffset { get; }
  • 定义
  • 语法
  • 构造函数
  • 属性
  • tapOffset
  • 语法

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新