activities
latest
false
UiPath logo, featuring letters U and I in white

UI Automation activities

Last updated Mar 13, 2026

GetAttribute

Retrieves an attribute of a specified UI element.

Definition

Namespace: UiPath.MobileAutomation.API.Models

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

Overloads

OverloadDescription
GetAttribute(IElementDescriptor, string, MobileOptions.GetAttributeOptions)Retrieves an attribute of a specified UI element, identified as an IEelementDescriptor.
GetAttribute(ObjectRepositoryTarget, string, MobileOptions.GetAttributeOptions)Retrieves an attribute of a specified UI element, identified as an ObjectRepositoryTarget.
GetAttribute(SelectorTarget, string, MobileOptions.GetAttributeOptions)Retrieves an attribute of a specified UI element, identified as a SelectorTarget.

GetAttribute(IElementDescriptor, string, MobileOptions.GetAttributeOptions)

Retrieves an attribute of a specified UI element, identified as an IEelementDescriptor.

GetAttribute(
	    IElementDescriptor element,
	    string attributeName,
	    MobileOptions. GetAttributeOptions options = null
)
GetAttribute(
	    IElementDescriptor element,
	    string attributeName,
	    MobileOptions. GetAttributeOptions options = null
)

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

Visit [Using objects in coded
automations](https://docs.uipath.com/studio/standalone/2023.10/user-guide/creating-an-object-repository#using-objects-in-coded-automations) to learn how to use Object Repository elements in
coded automations.
Visit [Using objects in coded
automations](https://docs.uipath.com/studio/standalone/2023.10/user-guide/creating-an-object-repository#using-objects-in-coded-automations) to learn how to use Object Repository elements in
coded automations.

attributeName String : The name of the attribute you want to retrieve from the specified UI element.

options MobileOptions.GetAttributeOptions (Optional) : Specifies the MobileOptions.GetAttributeOptions for the GetAttribute action. Default value is null.

GetAttribute(ObjectRepositoryTarget, string, MobileOptions.GetAttributeOptions)

Retrieves an attribute of a specified UI element, identified as an ObjectRepositoryTarget.

GetAttribute(
	    ObjectRepositoryTarget objectRepositoryTarget,
	    string attributeName,
	    MobileOptions. GetAttributeOptions options = null
)
GetAttribute(
	    ObjectRepositoryTarget objectRepositoryTarget,
	    string attributeName,
	    MobileOptions. GetAttributeOptions options = null
)

objectRepositoryTarget ObjectRepositoryTarget : An object of type ObjectRepositoryTarget. Can be constructed using FromObjectRepository(String, String, String, String) or FromObjectRepository(String[] , String, String, String) methods.

attributeName String : The name of the attribute you want to retrieve from the specified UI element.

options MobileOptions.GetAttributeOptions (Optional) : Specifies the MobileOptions.GetAttributeOptions for the GetAttribute action. Default value is null.

GetAttribute(SelectorTarget, string, MobileOptions.GetAttributeOptions)

Retrieves an attribute of a specified UI element, identified as a SelectorTarget.

GetAttribute(
	    SelectorTarget targetSelector,
	    string attributeName,
	    MobileOptions. GetAttributeOptions options = null
)
GetAttribute(
	    SelectorTarget targetSelector,
	    string attributeName,
	    MobileOptions. GetAttributeOptions options = null
)

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

attributeName String : The name of the attribute you want to retrieve from the specified UI element.

options MobileOptions.GetAttributeOptions (Optional) : Specifies the MobileOptions.GetAttributeOptions for the GetAttribute action. Default value is null.

Return value

The value of the retrieved attribute.

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated