Click the image by OCR

Learn how to develop your script to click an image by using OCR. You need to use the Click by OCR command to click the image by OCR.

Before you begin

This procedure assumes that you applied the recommended settings to work with surface automation.

  • Product requirements
    IBM RPA Studio license

  • User requirements

    • Permission to use IBM RPA Studio application
    • Permission to create or manage a script

Also, to reproduce the example in the following video, add the Launch and Attach Window command to your script to open the Notepad application.

Procedure

The following video shows how to use the IBM RPA Studio’s recorder to map and click the File menu in the Notepad application.

Note: The video has no narration.

The following steps describe how you can snip images by using the IBM RPA Studio’s recorder and add the Click by OCR command to your script according to the previous video.

  1. On the Notepad application, with the cursor over the File menu, press the Ctrl key.
  2. After the region is highlighted in green, go to the recorder bar, and select Actions > Click by OCR > Auto Suggest.
  3. In the OCR Click Preview window, you can enter the text File and click the Preview icon to search for the text on the image. Then, click Save.

The command window opens filled with the main input parameters based on the image that you selected. The following sample image shows that parameters:

The Click by OCR command generated when you use the recirder map an element in the computer's screen.

  • OCR Provider: Abbyy
  • Comparison: Contains
  • Language: English (United States)
  • Segmentation: Word
  • Text: File
  • Occurence Type: First occurence
  • Selector: Name
  • Name: File

Alternatively, you can also drag the Click by OCR command to your script from the toolbox.