Skip to main content

Canvas automation

This article demonstrates how Katalon Studio helps users to automate Canvas application test cases.

Note:
  • Please note that the integration will work for most users but has not been tested for every use case.

A canvas is a rectangular area on an HTML page, and it is specified with the elements in HTML 5. All objects inside the canvas can not be accessible via DOM (by Xpath, CSS, or Property). Because of the limited access to DOM, users have to find the coordinates for objects before performing the actions.

Use case

We illustrate two different application with our sample project:

Test steps

  • Perform calculations (1+8=9) on the calculator.
  • Open the Web application with Canvas.

  • Capture the Canvas Object.

  • Find the Coordinates for the Targeted Object inside the Canvas.

  • Perform the action.

Automate Canvas application test case with Katalon Studio

  1. Canvas application is completely working on coordinates.
  2. Find the coordinates for the object.
  3. Write a test script by using object coordinates.
  4. Run the test script on the browser.
  5. Verify the test result.