Using Variables as Image Asset Names in Image Clicks

When executing an image click from a visual test, you can use a visual test variable, an active data variable, or an expression for the image asset name. This enables you to execute the same image click on various image assets, depending on the value of the variable or the expression.

For a VB .NET script, this functionality is supported through the image recognition methods, ImageClick, ImageExists, and so on. In these methods, you specify a string as the image asset name. This string can be the name of a variable or of an expression.

For a visual test, you need to specify the name for the image asset in the properties of the image click test step:

  1. Open the visual test that contains the image click.
  2. Select the image click test step.
  3. Open the Properties pane.
  4. Expand the Parameters node.
  5. In the Image field, click ... and select the variable that you want to use as the image asset name.