Mobile controls

A control is a screen element in your application that you want to test. For example, a text box or a table. This topic lists all mobile application controls that Tosca Cloud supports:

Controls in native applications

Tosca Cloud supports the following controls in native applications:

Button

Tosca Cloud identifies buttons in native Android and iOS applications as buttons.

ButtonSelector

A ButtonSelector consists of radio buttons:

  • RadioGroup on Android

  • UISegmentedControl on iOS

Tosca Cloud creates a module attribute for the ButtonSelector.

CheckBox

Tosca Cloud identifies check boxes in native Android and iOS applications as checkboxes.

DatePicker

DatePicker controls allow you to select dates.

Available action modes are Input, Verify, and Buffer.

Dropdown

Dropdown controls such as ExposedDropdownMenuBox or DropdownMenu allow you to select an item from a predefined list of options.

To steer them in Tosca Cloud, use the Name property of the selected item.

Please note that this control type is available only in Android Jetpack Compose applications.

Image

Tosca Cloud identifies images in native Android and iOS applications as images.

For native iOS images, the Property enabled value is always True.

ItemSelector

An ItemSelector refers to:

  • Spinner on Android devices

  • UIPickerView on iOS devices

Steer ItemSelectors in native Android and iOS applications with the Name or the Index property.

Label

A Label refers to:

  • TextView on Android devices

  • UILabel on iOS devices

Tosca Cloud identifies labels in native Android and iOS applications as labels.

ListView

A ListView refers to:

  • ListView on Android devices

  • UITableView on iOS devices

For a single-line view, steer ListViews in native Android and iOS applications as described in Combobox. However, there is no action mode to verify, if an entry is selected.

PickerWheel

A PickerWheel refers to the wheel in a DatePicker, which you use date selections on iOS devices.

You can steer the following elements of a PickerWheel:

  • Hour

  • Minute

  • Day

  • Month

  • Year

Available action modes are Input, Buffer, and Verify.

RadioButton

Tosca Cloud identifies radio buttons in native Android and iOS applications as radio buttons.

SearchBar

A SearchBar in iOS applications consists of the following elements:

  • The search box, which Tosca Cloud identifies as SearchBar. Steer this control as described in Textbox.

  • A button. Steer this control as described in Button.

A SearchBar in Android applications consists of the following elements:

  • The search box, which Tosca Cloud identifies as TextBox. Steer this control as described in Textbox.

  • A button, which Tosca Cloud identifies as a Button or an Image. Steer this control as described in Button or Image.

Slider

A Slider refers to:

  • SeekBar on Android devices

  • UISlider on iOS devices

You can automate Sliders in native Android and iOS applications. Tosca Cloud supports all standard Sliders.

To steer a Slider in your test case, enter an integer between 0 and 100. This value is a percentage of the Slider range. For example, if a Slider has values that range from 0 to 1000, specifying 50 in your test case means that you set the Slider value to 500.

On some devices or in some applications, the full Slider might not be visible due to the screen resolution of the device or the implementation of the application. In this case, the value that Tosca Cloud selects may differ slightly from the value on the Slider. Adapt the value of your input to what is visible on the screen of your device.

Switch

A Switch refers to Switch on Android devices.

Tosca Cloud identifies Switches in native Android and iOS applications as checkboxes.

TabBar

A TabBar refers to:

  • TabHost on Android devices

  • UITabBar on iOS devices

Tosca Cloud identifies Switches in native Android and iOS applications as tabcontrols.

TextBox

A TextBox refers to:

  • EditText on Android devices

  • UITextField or UISecureTextField on iOS devices

Tosca Cloud identifies Switches in native Android and iOS applications as textboxes.

Other

Note that native mobile automation doesn't support user simulations. To simulate user interactions, use SendKeys keyboard commands.

Controls in mobile web applications

Tosca Cloud supports the following controls in mobile web applications: 

If you scan your application with Tosca XScan instead of the mobile scan, Tosca Cloud also supports the controls listed in Web application controls.

Note that mobile web automation only supports user simulations if you use the test case parameter UseXBrowserForMobile. Alternatively, you can use single keyboard commands in combination with SendKeys keyboard commands.

Controls in hybrid applications

Hybrid applications can have native and web controls, and you can steer them as described in this topic.