Inject an image

On an open device, you can inject an image to simulate the use of a camera. In this way, you can test apps that rely on camera usage, for example, barcode readers check scanners used by banks. Image files with the following extensions are supported: .jpeg, .jpg, .png, and .bmp. The file size cannot exceed 150 MB.

Prerequisites: For image injection to work, the application to test must be preinstalled with sensor instrumentation enabled. In addition, the app must stay in the foreground.

To learn how to work with image injection in Scriptless Mobile, watch this video or review the instructions following the video.

To inject an image:

  1. On an open device, start the application you want to test and activate the camera. Ensure that the app stays in the foreground.
  2. In the widgets pane, click the Environment button .
  3. On the Environment tab, click Inject Image.
  4. In the Inject Image widget, do the following:

    1. Select the location of your image file: Repository (default) or Computer.

    2. Depending on your selection in step a, do the following:

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

        Tip:

        You can search by tag name, if applicable. If a file is associated with tags, a tag symbol appears below the file name, along with the number of tags associated with the file. To view the tag names, move the pointer over the tag icon .

      • 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.
    3. To specify the testing method, select the required

      checkbox next to these options:

      • Execute the selected action on the device.

      • Add the selected action to the test.

    4. Select the file and click APPLY
      Scriptless Mobile injects the file and wait until the file is visible in your app.

    5. (Optional) To halt the image injection process, at the bottom, click STOP.
    6. (Optional) To return to the Environment tab, at the top, click Back.