test-suite
2024.10
true
UiPath logo, featuring letters U and I in white

Test Suite User Guide

Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Dec 4, 2024

Mobile automation activities and APIs

This section includes testing related activities and APIs found in the UiPath.Mobile.Automation.Activities package. Through these activities and APIs, you can create automations for your devices, running native or web applications.

To create mobile test cases in Studio, you can use the activities available in the Mobile.Automation package. Also, to create mobile coded test cases in Studio, you can use the APIs available in the mobileautomation service, downloaded with the Mobile.Automation package. Visit Mobile Automation APIs to check how to use the Mobile Automation APIs.

Activities

This section includes all activities related to mobile automation found in the Mobile.Automation package.

Activity

Description

Establishes a connection to a mobile device and provides scope for all subsequent activities/APIs.

Retrieves the log types from a device connected via the Mobile Device Connection.

Retrieves the logs from a mobile device connected via the Mobile Device Connection scope activity.

Installs a specified app on a mobile device connected via the Mobile Device Connection.

Retrieves the page source from a mobile device connected via the Mobile Device Connection scope activity.

Manages the current app by using a user input command.

Sends a user input command to a specified app on the target mobile device.

Navigates to a deep link inside an application.

Opens a specified URL in the currently active web browser.

Retrieves the current orientation of the specified mobile device.

Presses a hardware button on the connected device.

Changes and then retrieves the orientation of the connected device.

Takes a screenshot of the screen of the mobile device you are using with custom dimensions specified in the Height and Width properties.

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

Retrieves an attribute of a specified UI element.

Retrieves the selected item from a target UI element.

Extracts the text from a specified UI element and returns it as a string variable.

Sets the selected item on a target UI element.

Types the specified text into a target UI element.

Swipes the screen in a specified direction and for a specified amount of times.

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

Directional SwipePerform a swipe operation with the following pre-defined directions: Down, Up, Left, Right.
Draw PatternDraws a path marked by multiple points on the device screen.
Type TextTakes the content typed through the keyboard and pastes it into the currently active UI element.

APIs

This section includes all APIs related to mobile automation found in the Mobile.Automation package.

APIDescription
Connect/ConnectAsyncConnects a device to an application.
CreateApplicationCreates a new application and give it a name.
CreateDeviceCreates a new device. You can use this device in code but it will not be saved in Mobile Device Manager.
GetApplication/GetApplicationsGets the application with the specified name (with the same configurations present in Mobile Device Manager).
GetDevice/GetDevicesGets the device with the specified name (as you configured it in Mobile Device Manager).
DirectionalSwipePerform a swipe operation with the following pre-defined directions: Down, Up, Left, Right.
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. For example, you can retrieve the battery info or dismiss alerts (see Appium Commands).
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.
GetSesstionIdentifierRetrieve 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. If the Target is not set, the swipe operation performs a single swipe without searching for a specific element.
TakeScreenshotTakes a screenshot of the screen of the mobile device you are using with custom dimensions.
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.
  • Activities
  • 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.