Image Recognition/OCR Capability

Image Recognition/OCR Capability allows you to record and simulate any action that is performed outside the Browser Page scope. A few use cases where the Image Recognition/OCR capability will come in handy to the users:

  • A session may start with a browser, but at some point may transition to a native Windows application (e.g., a Citrix session starts with a browser but when launching the session, Citrix WorkSpace App takes over and all further actions happen using Citrix WorkSpace App and the content is not HTML/web-based).

  • Native Windows pop-ups occur during web-based access to an application (e.g., the application is integrated with Windows authentication, printer dialog box, file upload/download dialog box).

  • The workflow requires actions outside of the web page/DOM to be performed (e.g., launch a browser extension, click a bookmark, click a browser menu item).

  • Canvas-based HTML5 applications where bitmaps and images are rendered in a canvas (e.g., Citrix/AVD access from a browser happens using HTML5 browser).

  • Media rich web applications based on Microsoft Silverlight and Adobe Flash/Flex technologies

  • Web applications that use Shadow DOM elements (Shadow DOM acts as a hidden and separate DOM tree attached within a normal DOM)

  • Where image verification/Visual comparison is needed (i.e., Assert/Verify the visibility of images on screen)

To start recording an Image recognition/OCR activity as a transaction, click Ctrl+Shift+F9 from the simulation recorder as shown in Figure 1.

Figure 1 : Message to record Image recognition activities in the recorder

Figure 2 then appears where you would start recording a new transaction and activities for that transaction.

Figure 2 : Recording Image recognition activities

To add a new transaction, click the new transaction link in Figure 2. Figure 3 then appears where you will add the name of the transaction.

Figure 3 : Adding new transaction for recording OCR activities

To record an OCR activity, pick the OCR activity of your choice from the Activity drop down of Figure 2. Then, press Ctrl+F9 to open the snip tool, navigate to the image that you wish to capture and snip (i.e., screen capture) the image. The Target:Value pair is automatically based on the activity that you have chosen.

The following table lists the OCR activities and the purpose of each activity in detail.

Activity

Description

Target

Value

AssertImagePresent

Asserts that the specified image is present on the current screen.

The image that is expected to be present on the screen.

Not applicable.

AssertImageNotPresent

Asserts that the specified image is not present on the current screen.

The image that is expected to be not present on the screen.

Not applicable.

Click

Click on a specified image in the Target location.

The location of the image to be clicked.

Not applicable.

ClickAndType

Click on an image in the Target location and set the value as you typed it in.

The location of the image to be clicked and where the Value is to be typed.

The value to be typed into the image at the Target location.

ClickAndTypeWithEncrypt

Clicks on the image at the Target location and sets the encrypted Value as though you typed it in.

The location of the image to be clicked and where the Value is to be typed.

The encrypted/secret value to be typed into the image at the Target location.

ClickUntilImageIsPresent

Repeatedly clicks on an image at the Target location until it appears on the current screen.

The location where the image is to be clicked.

Not applicable.

DoubleClick

Double-clicks on the image in the Target location.

The location of the image to be double-clicked.

Not applicable.

MouseOver

Moves the mouse over (hovers over) the image in the Target location.

The location of the image to be hovered over with the mouse.

Not applicable.

RightClick

Perform a right-click on the image in the Target location with the mouse.

The location of the image to be right-clicked with the mouse.

Not applicable.

SendKeysIFImagePresent

Send keystrokes to the active foreground window if the specified image is present on the current screen. This is useful for handling window pop-ups that require explicit keyboard events.

The image expected to be present on the screen.

Key or value to be sent on active foreground window.

SendkeysUntilImageIsPresent

Repeatedly send keystrokes to the active foreground window if the specified image is present on the current screen. It is useful for handling window pop-ups that require explicit keyboard events.

The image expected to be present on the screen.

Key or value to be sent on active foreground window.

Type

Sets the value of an input field, as though you typed it in.

The location of the image where the Value is to be typed.

The value to be typed into the image at the Target location.

TypeEncrypt

Sets the value of an input field, as though you typed it in.

The location of the image where the Value is to be typed.

The encrypted/secret value to be typed into the image at the Target location.

WaitForImagePresent

Wait for the Target image to appear on the screen.

The image that is expected to be present on the screen.

The amount of time to wait (timeout in seconds).

WaitForImageNotPresent

Wait until the Target image is no longer present on the screen.

The image that is expected not to be present on the screen.

The amount of time to wait (timeout in seconds).

Note:

You can edit the image recognition transaction/activity in the same manner as that of web-based transaction/activity.