Device Object Methods

Applies to TestComplete 15.70, last modified on December 17, 2024

The Device object contains the following methods:

Method List

Name Description
Child Returns a child object by its index.
Click Simulates a click on the object.
Disconnect Closes a testing session opened on the device and disconnects from the device.
Drag Simulates dragging on the device's screen.
Drag Simulates dragging on a mobile device screen from the specified point to the specified distance.
Find Searches for a child object that has the specified property values.
FindAll Returns an array of child objects that have the specified property values.
FindAllChildren Returns an array of child objects that have the specified property values.
FindChild Searches for a child object that has the specified property values.
FindElement Searches for a mobile object that matches the specified condition.
FindElementByAccessibilityId Searches for a mobile object that has the specified Accessibility ID.
FindElementByClassName Searches for a mobile object that has the specified class name.
FindElementById Searches for a mobile object that has the specified identifier.
FindElements Searches for all mobile objects that match the specified condition.
FindElementsByAccessibilityId Searches for all mobile objects that have the specified Accessibility ID.
FindElementsByClassName Searches for all mobile objects that have the specified class name.
FindElementsById Searches for all mobile objects that have the specified identifier.
FindEx Searches for a child object that has the specified property values during the specified timeout period.
FindId Returns a child object by its identifier.
HideVirtualKeyboard Hides the virtual keyboard on the device.
IsVirtualKeyboardShown Specifies whether the virtual keyboard is shown on the device.
Keys Sends one or several key presses to an object.
LongTouch Simulates a long touch on the object.
Move Simulates moving a fingertip to the specified point of the device's screen.
PressButton Simulates pressing a physical button.
Process Returns the process specified by its name.
Refresh Refreshes the child object list.
RefreshAppiumContent Updates the tree of objects on the device.
Swipe Simulates a swipe action from one point of the screen to another.
Touch Simulates a single touch at the specified point of the screen.
Touch Simulates a touch on the object.
TouchAndHold Simulates touching the screen for the specified period of time.
TouchPress Simulates pressing at the specified point of the screen.
TouchRelease Simulates releasing the screen at the specified point.
Validate Obsolete. Generates the OnValidate event for the object.
WaitChild Waits until the specified child object becomes available during the timeout period.
WaitElement Pauses the script execution until a mobile object specified by the search condition becomes available.
WaitElementByAccessibilityId Pauses the script execution until a mobile object that has the specified Accessibility ID becomes available.
WaitElementByClassName Pauses the script execution until a mobile object that has the specified class name becomes available.
WaitElementById Pauses the script execution until a mobile object that has the specified identifier becomes available.
WaitProperty Waits until the specified object property achieves the specified value during the timeout period.

See Also

Device Object
Device Object Properties
Testing Android Applications (Legacy)

Highlight search results