Perform image analysis

The Scriptless Mobile visual analysis functionality facilitates advanced verification of visual or textual elements on the screen. This feature is based on a deep analysis of a screenshot of the actual device screen that serves as a 100% reflection of what the user sees.

Although visual analysis typically requires more processing time than object analysis, visual analysis is helpful when object analysis is not an option. For example, visual analysis might be helpful when an object is not well-defined and thus requires more advanced processing for conclusive verification. You can also use visual analysis to verify what users will actually see.

Scriptless Mobile translates any visual analysis action into a code snippet that you can embed into any test automation script in different programming languages.

Visual analysis supports:

  • Refine your testing by specifying parameters.
  • Test the effect of your specified parameters on the analysis. The result indicates the percentage of confidence to find the so-called needle in the haystack.
  • Create a command to use in your automation script in the programming language of your choice. Available options are Java (default), JavaScript, Python, Ruby, C Sharp, and PHP.

To analyze and verify an image, you select a command to run and then specify the image. You can select the image from a repository or from your computer, or create a screenshot. Then, specify any other required parameters and select the testing method.

Restriction: The image file cannot exceed 150 MB.

To learn how to perform image analysis in Scriptless Mobile, watch this video or review the instructions following the video.

To perform image analysis:

  1. In the widgets pane, click the Automation button .
  2. On the Automation tab, click Image Analysis.
  3. In the Image Analysis widget, do the following:

    1. Select a command from the list.

    2. To specify the image, take one of the following actions:

      • Click Add Image. In the Add Image dialog box, do the following:

        1. Select the location of your image file: Repository (default) or Computer. Depending on your selection, do one of the following:

          • Repository: Search for and select the repository file you want to use.

          • Computer:
            1. Click Upload a file.
            2. Browse to the file you want to use.
            3. Select the file and click Open.
              The file is uploaded.
        2. Click SELECT.
      • On the device, open an app or navigate to a location of your choice. Click Take Screenshot.

    3. (Optional) To select part of the image, use the handles of the crop indicators in the image to crop the image. To confirm your selection, click the confirmation button . To cancel your selection, click the cancel button .

      Tip: You can select an area of the image and zoom in using the mouse wheel button. If you have a touchpad, you can use the pinch motion to zoom in.
    4. (Optional) To save the file to a location, do the following. If you do not save the image to an explicit location, by default, the image file is saved to a Public folder in the Perfecto Repository.

      1. Click the save button .

      2. In he Save file dialog box, enter a file name.

      3. Select a folder (Private or Public).

      4. (Optional) Create a locator.

      5. Click SAVE.

    5. (Optional) Click Advanced parameters and select any required parameters. Enter appropriate parameter values.
      For information on the available parameters, see Available parameters.
    6. Click Try.
    7. To specify a testing method, select the required checkbox next to these options:

      • Execute the selected action on the device.

      • Add the selected action to the test.

    8. Click APPLY.

  4. (Optional) To return to the Automation tab, at the top, click Back.