Automation Engineer
Level 1
Exercise 8
Image Based Controls
Exercise 8 | Image Based Controls
Objective
By the end of this exercise, you will be able to create an image-based control in Tosca.
Why is this Important?
Use the Image based controls to identify a control while scanning it in Tosca when no other
object identification technique works. Additionally, Image based controls are used for
verifying the OCR Texts.
Project Perspective
Some use cases may require verification of OCR texts, Image based controls would come
handy in such use cases.
Instructions
1. Open https://demowebshop.tricentis.com in a web browser
2. Navigate to the path AE1 Exercises>>TestCases>>Image Based Controls, create a new
TestCase and name it as Image based controls
3. Navigate to AE1 Exercises>>Modules>> Image Based Controls, right-click and select the
Create Imaged Based Control
4. Click on the plus sign on the blue square, in the window opened; The currently open
window will minimize and the cursor will become a reticle
5. Define the area to be captured by clicking and dragging the mouse around the landing
page Demo Web Shop logo to define the area to be captured
Note: Make sure to include the entire image and text when defining the area
to be captured.
6. Select the control type Generic and then click the save icon
7. A new window will pop up titled Images identifying Control; Name it as Landing Page
Logo and click Save
2
Exercise 8 | Image Based Controls
8. In Tosca, rename the module created from Screen to Demo Web Shop Logo
9. Add the module Demo Web Shop Logo to the TestCase Image Based Controls
10. Input Values as shared in the table below:
TestStep Value Value Action Mode
Screen
Landing Page .OCRText==Demo Web Verify
Logo Shop*
11. Mark this TestCase as Complete and run it in Scratchbook
Expected Outcome
The Test Case should be executed successfully and the OCT Text of the Logo image
would be verified.
Hints
Use the Image based controls to verify the OCR texts.