Perform image-based scans

When you design your Bot, you use the following types of Modules (see "Use Modules"):

This chapter describes how to create Modules by performing image-based scans.

With image-based scans, you can identify controls by image. This lets you automate processes without having to script a workaround for technologies that are currently not supported.

During the scan, you take a screenshot of the control you want to steer.

RPA Studio saves the information as a new Module. In the Steps you create from the Module, you define what exactly the Bot should do with the control.

At run-time, your Bot uses the saved screenshot to identify the control. It then performs the actions you defined.

Image-based identification of controls adds vulnerability to your Bot. You don't identify controls by their unique technical properties, but through images. This means that you have to consider things such as screen resolution, color depth, or scrolling when you run your Bot.

Open the scan interface

To open the scan interface, follow the steps below:

  1. Ensure that your display settings are set to 100%.

  2. Open the application that you want to scan and bring it to the front.

  3. In RPA Studio, right-click a Bot or a folder and select Scan from the context menu, or click on Scan in the RPA menu.

  4. In the subsequent dialog, click on Control via image.

You can also access the scan in the following ways:

This opens the Image-based scan window:

Image-based scan window

Perform the scan

To perform the scan, follow the steps below:

  1. Ensure that the application you want to scan is in the foreground.

  2. In the Image-based scan window, click on Start or press F12.

  3. In your application, highlight the area that you want to screenshot. The scan marks the area you selected with a red outline.

  1. Back in the Image-based scan window, choose the control type from the Type drop-down menu:

  2. Enter a name for your control into the Name field.

  3. Click on Use this image as a reference image.

Use this image of the control to identify the control

  1. If needed, adjust the Tolerance slider. This slider determines how closely the identifying screenshot must match the control on the screen when the Bot tries to identify it.

    The lower the value, the less closely the screenshot must match.

    The default value is 95 percent.

Increase the tolerance by moving the slider down to 80 percent

  1. If you want to add another control to this Module, click Save & Next.

  2. Click Finish.

  3. In the subsequent screen, enter a name for your Module into the Module Name field.

  4. To save the Module and finish the scan, click Save.

RPA Studio saves the information as a new Module with the name you specified.

Each control is a separate ModuleAttribute.

Image-based Module ExampleModule with the control DemoButton

Use different or additional images for identification

You can use different or additional screenshots as reference images to identify a control. These screenshots can overlap.

This is useful if your control doesn't always look the same. In this case, define additional or different areas in your application that the Bot should use for identification.

For instance in the following cases:

  • Your control is a text box, whose content differs. However, its label remains constant. So you want the Bot to identify the text box by a screenshot of the label, instead of a screenshot of the text box itself.

  • Your control is a toggle button. You want the Bot to recognize it, no matter if the toggle is ON or OFF. So you add an additional screenshot.

At run-time, the Bot searches for the first reference image. If the Bot can't find it, it moves on to the next reference image. Consequently, using multiple screenshots to identify a control increases a Bot's stability, but also the execution time.

To use different or additional screenshots, follow the steps below:

  1. Start the scan and highlight the control with your mouse.

  2. If you want to use a different screenshot as the identifying image, click on Use different image as a reference image.

    Then screenshot a different area in your application.

    Once you have done so, you can add further images. To do so, click on Add reference images.

Use a different screenshot to identify this text box

  1. If you want to identify the control by the current screenshot as well as additional screenshots, perform the following actions:

    • Click on Use this image as a reference image.

    • Click on Add reference images and take another screenshot.

      RPA Studio directly adds this screenshot to the list of images in the image scan window.

Identify the control ToggleButton through two screenshots

  1. You can add as many identifying screenshots as you need.

  2. To remove screenshots that you don't want to use, click on .

  3. Click Finish.

  4. In the subsequent screen, enter a name for your Module into the Module Name field.

  5. To save the Module and finish the scan, click Save.

Edit Modules

You can edit Modules after the scan.

Add controls

To add additional controls to existing image-based Modules, follow the steps below:

  1. In RPA Studio, right-click the Module or a Step and select Scan Image Control from the context menu.

    You can also access the scan via the RPA menu.To do so, click on Scan Image Control.

  2. Perform the scanning process as described above.

Add or change identifying screenshots

You can change the identifying screenshots of a control, or you can add additional screenshots.

This is possible for the following types of controls:

To change or add screenshots, right-click the corresponding ModuleAttribute or Step Values and select Rescan Image from the context menu.

This opens the image scan window, where you can add or change screenshots as described in chapter "Use different or additional images for identification" above.

You can also access the image scan window in one of the following ways:

  • Select the ModuleAttribute and click on Rescan Image in the RPA menu.

  • Select the ModuleAttribute and click on Edit images in the Identification images tab.

Edit images button in the Identification images tab

Verify control texts in images

When you create image-based controls, you choose a type for your control: Button, TextBox, or Image.

You can use OCR (Tesseract) or the UIAText property to verify texts in Image controls.

For information on how to do so, see the Tricentis Tosca documentation.

Was this information helpful?

Tricentis RPA Studio Manual 2020.2 © Tricentis GmbH