E2E Testing + Annotations

Which product are you using?
PDF.js Express Viewer>

PDF.js Express Version

Detailed description of issue
Playwright/Cypress are E2E testing tools that have access to the rendered HTML of the application.

I’m trying to run E2E on interactions with Annotations, and since they are not native dom elements I need to be able to access the WebViewer instance to be able to test functionality.

How can I access to webviewer instance to trigger annotation events with only the HTML as a reference?

Hello dale, if you have access to the HTML element you can do:


Best regards,

1 Like

This is perfect, thank you.