Working With iOS Switch Controls

Applies to TestComplete 14.40, last modified on April 22, 2021

Switch controls controls can be in one of two states: On or Off. A user can touch or swipe a switch to change its state. TestComplete provides extended support for iOS switch controls.

Note: The described support is available only if the tested iOS application and the computer where TestComplete is running have been prepared for testing in a special way. See Preparing Applications, Devices and Test Computers for iOS Testing.

The supported switch classes are listed in the project’s Object Mapping options. You can extend this list. For example, you can add the class name of a custom switch used in your tested application, and thus enable the recording and scripting support for this control. For more information, see Object Mapping.

The iOS Switch object provides access to native properties and methods of the underlying switch control. It also provides specific properties and methods that can be used for simulating user actions on switches and for retrieving control data.

The topics of this section provide detailed information on working with switch controls in TestComplete and contain sample scripts.

In This Section

Changing the Switch State

Describes how to turn on or off a switch control.

Determining a Switch's State

Explains how to obtain the state of a switch.

Related Topics of Interest

Testing iOS Applications

Describes the most common approaches for testing iOS applications.

See Also

iOS Switch Support
Object-Specific Tasks
Supported Controls

Highlight search results