FindElements Method (Mobile Objects)

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

Description

Use the FindElements method to find all mobile objects that match a search condition.

Requirements

  • An active license for TestComplete Mobile Module.

  • The Appium Support plugin must be enabled in TestComplete. You can check the plugin state in the File > Install Extensions dialog in TestComplete. You can find the plugin in the Mobile group.

  • Your TestComplete workstation must have access to the mobile device cloud.

  • Your tested mobile application must be compiled with accessibility information. To learn more, see the documentation for the IDE you use to develop your application.

  • A testing session must be opened on your mobile device, and your test must have access to that session. See Connecting to Mobile Device Clouds and Opening Testing Sessions.

Declaration

TestObj.FindElements(LocationStrategy, SelectorValue)

TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
LocationStrategy [in]    Required    String    
SelectorValue [in]    Required    String    
Result An array of the tested objects.

Applies To

The method is applied to the following object:

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.

Parameters

The method has the following parameters:

LocationStrategy

A string that specifies the locator strategy the method will use to search for objects. The string value depends on the driver you use to open the testing session on your mobile device. See the Selector Strategies section in the Appium documentation.

SelectorValue

A string that specifies the search condition. Depending on the LocationStrategy, it can be an XPath expression, an ID, Accessibility ID, or the class of the tested objects.

Result Value

An array of the objects that match the specified condition.

If no matching object has been found, the method returns an empty array.

See Also

FindElement Method (Mobile Objects)
WaitElement Method (Mobile Objects)
About Mobile Tests

Highlight search results