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

用户界面自动化活动

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

点击

返回一个布尔值变量,用于声明指定的用户界面元素是否存在。 该 API 没有返回值,但如果存在指定的用户界面元素(布尔值),则会对其执行点击操作。

定义

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

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

重载

重载描述
Tap(IElementDescriptor, TapTypeEnum, MobileOptions.TapOptions)无论是否存在IElementDescriptor用户界面元素,都会返回一个布尔值变量。
Tap(ObjectRepositoryTarget, TapTypeEnum, MobileOptions.TapOptions)无论是否存在ObjectRepositoryTarget用户界面元素,都会返回一个布尔值变量。
Tap(SelectorTarget, TapTypeEnum, MobileOptions.TapOptions)无论是否存在SelectorTarget用户界面元素,都会返回一个布尔值变量。

Tap(IElementDescriptor, TapTypeEnum, MobileOptions.TapOptions)

无论是否存在IElementDescriptor用户界面元素,都会返回一个布尔值变量。

Tap(
	    IElementDescriptor element,
	    TapTypeEnum tapType = TapTypeEnum.Single,
	    MobileOptions. TapOptions options = null
)
Tap(
	    IElementDescriptor element,
	    TapTypeEnum tapType = TapTypeEnum.Single,
	    MobileOptions. TapOptions options = null
)

element :对象存储库中使用ObjectRepository.Descriptors类访问的用户界面元素。

Visit [Using objects in coded automations with
Mobile Automation](https://docs.uipath.com/studio/standalone/2024.4/user-guide/creating-an-object-repository#using-objects-in-coded-automations-with-mobile-automation) to learn how to use Object Repository elements
with mobile automation.
Visit [Using objects in coded automations with
Mobile Automation](https://docs.uipath.com/zh-CN/studio/standalone/2024.4/user-guide/creating-an-object-repository#using-objects-in-coded-automations-with-mobile-automation) to learn how to use Object Repository elements
with mobile automation.

tapType TapTypeEnum (可选):指定点击类型。默认值TapTypeEnum.Single 。可以从以下值中选择:

* `Single`
* `Double`
* `LongPress`
* `Single`
* `Double`
* `LongPress`

options MobileOptions.TapOptions (可选):指定点击操作的MobileOptions.TapOptions 。默认值为 null。

Tap(ObjectRepositoryTarget, TapTypeEnum, MobileOptions.TapOptions)

无论是否存在ObjectRepositoryTarget用户界面元素,都会返回一个布尔值变量。

Tap(
	    ObjectRepositoryTarget objectRepositoryTarget,
	    TapTypeEnum tapType = TapTypeEnum.Single,
	    MobileOptions. TapOptions options = null
)
Tap(
	    ObjectRepositoryTarget objectRepositoryTarget,
	    TapTypeEnum tapType = TapTypeEnum.Single,
	    MobileOptions. TapOptions options = null
)

objectRepositoryTarget对象存储库目标ObjectRepositoryTarget类型的对象。

tapType TapTypeEnum (可选):指定点击类型。默认值TapTypeEnum.Single 。可以从以下值中选择:

* `Single`
* `Double`
* `LongPress`
* `Single`
* `Double`
* `LongPress`

options MobileOptions.TapOptions (可选):指定点击操作的MobileOptions.TapOptions 。默认值为 null。

Tap(SelectorTarget, TapTypeEnum, MobileOptions.TapOptions)

无论是否存在SelectorTarget用户界面元素,都会返回一个布尔值变量。

Tap(
	    SelectorTarget targetSelector,
	    TapTypeEnum tapType = TapTypeEnum.Single,
	    MobileOptions. TapOptions options = null
)
Tap(
	    SelectorTarget targetSelector,
	    TapTypeEnum tapType = TapTypeEnum.Single,
	    MobileOptions. TapOptions options = null
)

targetSelector选取器目标SelectorTarget类型的对象。可以使用FromSelector(String)方法构建。

tapType TapTypeEnum (可选):指定点击类型。默认值TapTypeEnum.Single 。可以从以下值中选择:

* `Single`
* `Double`
* `LongPress`
* `Single`
* `Double`
* `LongPress`

options MobileOptions.TapOptions (可选):指定点击操作的MobileOptions.TapOptions 。默认值为 null。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新