UiPath Documentation
activities
latest
false
UI Automation activities

ElementExists

ElementExists in the Mobile Automation coded automation API: returns a boolean variable that states whether a specified UI element exists.

Returns a boolean variable that states whether a specified UI element exists.

Definition​

Namespace: UiPath.MobileAutomation.API.Models

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

Overloads​

OverloadDescription
ElementExists(IElementDescriptor, MobileOptions.ElementExistsOptions)Returns a boolean variable that states whether an Object Repository element (IElementDescriptor) exists.
ElementExists(ObjectRepositoryTarget, MobileOptions.ElementExistsOptions)Returns a boolean variable that states whether an Object Repository target (ObjectRepositoryTarget) exists.
ElementExists(SelectorTarget, MobileOptions.ElementExistsOptions)Returns a boolean variable that states whether a native selector (SelectorTarget) exists.

ElementExists(IElementDescriptor, MobileOptions.ElementExistsOptions)​

Returns a boolean variable that states whether an Object Repository element (IElementDescriptor) exists.

ElementExists(
	    IElementDescriptor element,
	    MobileOptions. ElementExistsOptions options = null
)
ElementExists(
	    IElementDescriptor element,
	    MobileOptions. ElementExistsOptions options = null
)

element: A UI element from the Object Repository that you access using the ObjectRepository.Descriptors class.

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/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: Specifies the MobileOptions.ElementExistsOptions for the ElementExistsOptions action. Default value is null.

ElementExists(ObjectRepositoryTarget, MobileOptions.ElementExistsOptions)​

Returns a boolean variable that states whether an Object Repository target (ObjectRepositoryTarget) exists.

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

objectRepositoryTarget ObjectRepositoryTarget: An object of type ObjectRepositoryTarget.

options MobileOptions.ElementExistsOptions: Specifies the MobileOptions.ElementExistsOptions for the ElementExistsOptions action. Default value is null.

ElementExists(SelectorTarget, MobileOptions.ElementExistsOptions)​

Returns a boolean variable that states whether a native selector (SelectorTarget) exists.

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

targetSelector SelectorTarget: An object of SelectorTarget type. Can be constructed using FromSelector(String) method.

options MobileOptions.ElementExistsOptions: Specifies the MobileOptions.ElementExistsOptions for the ElementExistsOptions action. Default value is null.

Return value​

True if element exists, and False if element doesn't exist.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated