Supported Xamarin.Forms Controls

Applies to TestComplete 14.0, last modified on January 23, 2019

TestComplete supports testing of various Xamarin.Forms controls. You can also modify project properties so that TestComplete recognizes your custom Xamarin.Forms controls. The sections below describe how you can test Xamarin.Forms controls in detail.

About Supported Xamarin.Forms Controls

TestComplete can recognize controls in Xamarin.Forms applications that have been prepared for testing. It checks a control’s class name and automatically associates it with the appropriate scripting object.

For recognized Xamarin.Forms controls, TestComplete provides a number of standard methods and properties that it provides for all tested and onscreen objects. In addition, TestComplete provides extended support for the most popular Xamarin.Forms controls (see below). It also provides a number of supplementary methods and properties that help you simulate various actions on controls, for example, selecting individual items in a list view or getting a control’s text.

Also, TestComplete provides access to “native” methods and fields of the recognized controls. You can use them to perform specific actions or retrieve data from a control, if other testing means are not enough.

Requirements

  • You must have an active license for the TestComplete Mobile module.

  • Support for Xamarin.Forms controls is implemented by the Mobile Support plugin and by the Android Support or iOS Support plugin (depending on whether you are testing on Android or on iOS). All these plugins are installed and enabled automatically as part of the TestComplete Mobile module.

    If you experience issues when working with Xamarin.Forms controls, select File > Install Extensions from the TestComplete main menu and check whether the plugins are active. (You can find the plugins in the Mobile group.) If some plugin is not available, run the TestComplete installation in the Repair mode.

  • Your tested Xamarin.Forms application and the device must be prepared for testing as it is described in the topics of the Preparing Xamarin.Forms Applications and Devices section.

Supported Controls

Below is the full list of the Xamarin.Forms controls for which TestComplete provides extended support.

Note that TestComplete provides support for the listed controls as well as for their descendants. However, to make this possible, you need to specify the class name of your inherited control in the corresponding group of the project’s Object Mapping options. For more information, see Object Mapping.

Controls Classes
Xamarin.Forms Button Xamarin.Forms.Button
Xamarin.Forms CarouselPage Xamarin.Forms.CarouselPage
Xamarin.Forms DatePicker Xamarin.Forms.DatePicker
Xamarin.Forms Editor Xamarin.Forms.Editor
Xamarin.Forms Entry Xamarin.Forms.Entry
Xamarin.Forms ListView Xamarin.Forms.ListView
Xamarin.Forms NavigationPage Xamarin.Forms.NavigationPage
Xamarin.Forms Picker Xamarin.Forms.Picker
Xamarin.Forms Slider Xamarin.Forms.Slider
Xamarin.Forms Stepper Xamarin.Forms.Stepper
Xamarin.Forms Switch Xamarin.Forms.Switch
Xamarin.Forms TabbedPage Xamarin.Forms.TabbedPage
Xamarin.Forms TableView Xamarin.Forms.TableView
Xamarin.Forms TimePicker Xamarin.Forms.TimePicker

Recognizing Custom Controls

To command TestComplete to recognize your custom Xamarin.Forms controls, open your project’s Object Mapping options and add the control’s class name to the corresponding subgroup of the Xamarin.Forms Controls group. The subgroup name corresponds to your custom control’s type. Once the control is mapped, it gets all the properties, methods and actions specific to the Xamarin.Forms control of the corresponding type.

If the specified custom control does not fit the control’s type, then it may not properly respond to commands that TestComplete sends, so recording or playing back user actions over the tested control will cause errors.

See Also

Supported Controls
Testing Xamarin.Forms Applications

Highlight search results