Use the Image Based Action operation to simulate various actions over the control or screen area specified by its image in the Image Repository collection. For example, you can simulate touching a control on a mobile device screen or clicking an icon on the PC desktop.
The operation does not have any specific requirements.
However, to use the operation to simulate user actions on a mobile device, you will need:
A license for the TestComplete Mushroom LifeStride Adriana Ankle Women's Bootie rgI1gqRvWZ module.
The Mobile module’s plugins must be enabled in TestComplete.
In addition, to check images on iOS devices, your iOS application must be prepared for testing and running. Otherwise, TestComplete will not have access to the iOS device’s screen.
The operation returns the same value, which the called method returns. For information on how to obtain the result value, see Checking Operation Result.
The operation is an analogue of calling a method of the appropriate
ImageSetItem object from script.
The operation cannot have child operations.
The operation has the following parameters:
The name of the item in the Image Repository over which you want to simulate a user action.
The name of the method to call.
The method’s parameters, if any.
When you add the operation to your keyword test, TestComplete displays a wizard that lets you specify all these parameters:
On this page, you select an image that the operation will search for on your PC desktop or mobile device screen. You can either select an existing image from your Image Repository, or capture the image from the screen:
To select an existing image:
From the Image Set drop-down list, select the image set that has the needed image.
The wizard will show the list of the image set’s images. Select the needed image and click Next.
To capture a new image:
Click Capture New Image.
TestComplete will call the Add Image to Image Repository wizard.
Follow the wizard instructions to capture the needed image on your PC desktop or on the mobile device screen.
|Note:||To capture the image from a mobile device screen, connect your device to TestComplete. To learn how to do it, see —
In addition, to access the screen of your iOS device, your tested application must be prepared for testing and running on the device.
On this page, you select a method that you want to call to simulate a needed user action over the found UI element. You can find the description of the available methods in Simulating Basic User Actions in Image-Based Tests.
To find the needed method faster, you can type a part of its name in the Quick Search edit box. The wizard will filter out the method list and show only the methods that match the text you are typing.
On this page, you specify parameters of the method that the operation will call. For information on parameters, see the appropriate method description —
After adding the operation to the test, you can modify the operation parameters with the same wizard that you used to add the operation. To invoke the wizard, simply double-click the operation’s row in the Keyword Test editor.
To modify parameters of the operation, you can also use the in-place editors and dialogs provided by the Keyword Test editor.