See what happened on screen

Keep visual evidence from your Cordova/Capacitor session so you can review the UI alongside app activity.

Screenshots help you investigate what the user saw when an issue occurred. Record periodic frames for session review, or capture the current screen at a specific moment.

Configure session replay:

const options = Ansight.createOptionsBuilder()
  .withSessionJpegCapture({
    intervalMilliseconds: 2000,
    quality: 60,
    maxWidth: 480,
    mode: "screenshotAndVisualTree",
    captureKeyboardPresence: true,
  })
  .build();

Capture one frame:

await Ansight.captureScreenFrame({
  quality: 70,
  maxWidth: 720,
});

Screenshots use the native Android/iOS implementation and include the rendered WebView. The resident host may use host-side capture for a simulator or emulator; a physical iPhone or iPad uses in-app capture. Disable periodic capture for trend-focused runs.

Visual-Tree and Keyboard Metadata

mode accepts "screenshotOnly" (the default), "screenshotAndVisualTree", or "screenshotWithVisualTreeOnTouch". Screenshot-aligned mode captures registered native or DOM sources with each app-owned frame. Touch mode captures trees on touch down and touch up; move and cancel events do not trigger a tree.

Tree capture requires a registered visual-tree provider, and touch-triggered mode requires touch capture. Payloads follow the compact visual-tree v2 contract.

captureKeyboardPresence defaults to false and records only whether the native on-screen keyboard was present. It never records keyboard contents or dimensions and remains useful when the host owns simulator/emulator screenshots.