Simulating User Actions in Hybrid Applications (Legacy)

Applies to TestComplete 15.65, last modified on July 17, 2024
The information below concerns legacy mobile tests that work with mobile devices connected to the local computer. For new mobile tests, we recommend using the newer cloud-compatible approach.

When testing hybrid applications, you interact with them in the same way you interact with native mobile applications.

Actions against controls in WebViews are performed asynchronously. This means that TestComplete does not wait for the operation to finish. For more information, see the Possible Issues With Hybrid Mobile Applications (Legacy) topic.

Simulating Touch Actions

You can use TestComplete to simulate touch actions over controls in your applications in several ways:

Simulating Text Input

TestComplete provides the following ways to simulate test input in your application:

  • Depending on the control's class, TestComplete may provide specific methods and properties that you can use to simulate text input. For example, TestComplete provides the SetText method for text boxes. This method works for both Web and native controls. TestComplete does not simulate input letter by letter. For information on what method to use to simulate text input, see the topics that describe the corresponding controls.

  • TestComplete provides the Keys method for all controls of your application and for the AndroidDevice and iOSDevice objects. The AndroidObject.Keys and iOSObject.Keys methods first activate the control, and then type text. The AndroidDevice.Keys and iOSDevice.Keys methods type text in the active control. These methods simulate text input letter by letter. You can use special keys like Ctrl or Backspace.

    Note: Make sure that the TestComplete Android Agent keyboard is available if you plan to enter local symbols on Android devices. See the Simulating Local Symbol Input (Legacy) topic for more information.
  • TestComplete can access native methods and properties of the tested application. You can use these methods to enter text in your application.

You can find more information on simulating text input in the following topics:

Simulating User Actions Over Device

When users work with application, they may perform actions over device. For example, they may turn the device to change its orientation, or use physical buttons. For more information on simulating these actions in your tests, see the following topics:

See Also

Testing Hybrid Mobile Applications (Legacy)

Highlight search results