§
SYSTEM: ONLINE
← BACK TO MODULES

HTML5 Canvas & Mouse Events

A <canvas> element is a black box to traditional DOM locators. You cannot find specific lines or text inside it using CSS selectors. To interact with it, automation scripts must synthesize raw mouse events (x/y coordinates).

TARGET OBJECTIVE:

  • Locate the canvas element.
  • Dispatch a `mousedown` event inside the canvas.
  • Dispatch a series of `mousemove` events to draw a "signature" (must be at least 150px wide and 50px tall).
  • Dispatch a `mouseup` event to submit the drawing for validation.

AUTHORIZATION PAD

SIGN HERE //
STROKES DETECTED: 0
W: 0pxH: 0px