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

用户界面自动化活动

上次更新日期 2026年1月14日

ElementExists

返回一个布尔值变量,用于声明指定的用户界面元素是否存在。

定义

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

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

重载

重载描述
ElementExists(IElementDescriptor, MobileOptions.ElementExistsOptions)返回一个布尔值变量,该变量声明对象存储库元素 ( IElementDescriptor ) 是否存在。
ElementExists(ObjectRepositoryTarget, MobileOptions.ElementExistsOptions)返回一个布尔值变量,该变量声明对象存储库目标 ( ObjectRepositoryTarget ) 是否存在。
ElementExists(SelectorTarget, MobileOptions.ElementExistsOptions)返回一个布尔值变量,该变量声明是否存在原生选取器 ( SelectorTarget )。

ElementExists(IElementDescriptor, MobileOptions.ElementExistsOptions)

返回一个布尔值变量,该变量声明对象存储库元素 ( IElementDescriptor ) 是否存在。

ElementExists(
	    IElementDescriptor element,
	    MobileOptions. ElementExistsOptions options = null
)
ElementExists(
	    IElementDescriptor element,
	    MobileOptions. ElementExistsOptions 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.

options MobileOptions.ElementExistsOptions :为ElementExistsOptions操作指定MobileOptions.ElementExistsOptions 。默认值为 null。

ElementExists(ObjectRepositoryTarget, MobileOptions.ElementExistsOptions)

返回一个布尔值变量,该变量声明对象存储库目标 ( ObjectRepositoryTarget ) 是否存在。

ElementExists(
	    ObjectRepositoryTarget objectRepositoryTarget,
	    MobileOptions. ElementExistsOptions options = null
)
ElementExists(
	    ObjectRepositoryTarget objectRepositoryTarget,
	    MobileOptions. ElementExistsOptions options = null
)

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

options MobileOptions.ElementExistsOptions :为ElementExistsOptions操作指定MobileOptions.ElementExistsOptions 。默认值为 null。

ElementExists(SelectorTarget, MobileOptions.ElementExistsOptions)

返回一个布尔值变量,该变量声明是否存在原生选取器 ( SelectorTarget )。

ElementExists(
	    SelectorTarget targetSelector,
	    MobileOptions. ElementExistsOptions options = null
)
ElementExists(
	    SelectorTarget targetSelector,
	    MobileOptions. ElementExistsOptions options = null
)

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

options MobileOptions.ElementExistsOptions :为ElementExistsOptions操作指定MobileOptions.ElementExistsOptions 。默认值为 null。

返回值

如果元素存在,则为True如果元素不存在,则为False

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2026 UiPath。保留所有权利。