activities
latest
false
UiPath logo, featuring letters U and I in white
UI Automation Activities
Last updated Nov 25, 2024

APIs

APIs allow you to access and interact with the services offered in the Manage Packages menu. You can use these APIs when you design coded automations. Visit Coded Automations to learn about coded automations and how to design them using APIs.
Note: Using Go to Definition (F12) allows you to access the definition of UiPath APIs for a certain service. We recommend relying only on the directly exposed APIs when you implement coded automations. Other APIs that are not directly exposed with a service are subject to change without prior notification.

Overloads

APIs often have overloads, which means they provide multiple versions of the same method with different parameter options. Overloads allow you to customize the behavior of the API based on your specific requirements. For example, a UI Automation API may have an overload that accepts a timeout parameter to specify the maximum time to wait for a UI element to appear before ending execution.

By using the APIs with their respective overloads, you can easily achieve your desired automation logic and behavior.

Mobile Automation APIs

This section includes the APIs found in the UiPath.MobileAutomation.API.Models service.

APIDescription
DisposeReleases resources used during automation, clears memory taken up by these actions, and returns the Connection back to its original state. This makes these resources available for other tasks on a Connection.
DrawPatternDraws a path marked by multiple points on the device screen. The points that create the path are recorded from the path of the finger on the device screen. You can add multiple finger paths to simulate screen interactions that involve multiple fingers.
ElementExistsReturns a boolean variable that states whether a specified UI element exists.
ExecuteCommandExecute native mobile commands that are not associated with a specific endpoint.
FinalizeEnables an object to perform cleanup operations and release resources before it is reclaimed by garbage collection. Implements the Object.Finalize method.
GetAttributeRetrieves an attribute of a specified UI element.
GetDeviceOrientationRetrieves the current orientation of the specified mobile device.
GetLogTypesRetrieves the log types from a device connected via the mobile device Connection.
GetPageSourceRetrieves the page source from a mobile device connected via the Connection class.
GetSelectedItemRetrieves the selected item from a target UI element.
GetSessionIdentifierRetrieve the session ID of the current Mobile Device Manager connection to route HTTP commands to Appium endpoints so you can perform custom actions.
GetSystemTimeRetrieves the current time of the device.
GetTextExtracts the text from a specified UI element and returns it as a String variable.
InstallAppInstalls a specified app on a mobile device connected via Connection.
ManageCurrentApplicationResets or launches the current app for this session.
ManageOtherApplicationManages other applications using commands.
OpenDeepLinkOpens a deep link inside an application.
OpenUrlOpens a URL in Chrome. The current active application should be Chrome, having at least one opened tab, before calling this method.
PositionalSwipeSwipes to a predefined location on the screen with starting and ending points.
PressHardwareButtonPresses a hardware button on the connected device.
SaveLogsSave logs of a specific type to a file.
SetDeviceGeoLocationSets the current geo-location of the device.
SetDeviceOrientationChanges and then retrieves the orientation of the connected device.
SetSelectedItemSets the selected item on a target UI element.
SetTextTypes the specified text into a target UI element, recognized by Mobile Automation.
SwipeThe swipe operation iterates through multiple swipes on the list (up to MaxNumberOfSwipes) until it locates the specified element.
TakeScreenshotTakes a screenshot of the screen of the mobile device you are using with custom dimensions specified in the Height and Width parameters.
TapReturns a boolean variable that states whether a specified UI element exists. The API doesn't have a return value, but if the specified UI element exists (boolean value), then it performs tap operations on it.
TypeTextTakes the content typed through the keyboard and pastes it into the currently active UI element. To paste the text inside the element that you want, you need to focus wherever on the UI where you want to paste the text. You can use this API when automating applications for which you need to type text through the keyboard, but without a target element that is recognized by Mobile Automation.

Using APIs

Use the following format, to call an API from the corresponding service: service.API. For example, system.GetAsset.

Using Mobile Automation APIs

To use Mobile Automation APIs, you first establish a connection to your device and application (visit Connection to learn more), then call the desired automation methods on this connection, such as connection.Tap(<selector>); or var orientation = connection.GetDeviceOrientation();.
  • Overloads
  • Mobile Automation APIs
  • Using APIs
  • Using Mobile Automation APIs

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.