Hi everyone, I'm in the midst of developing an e2e test suite for a map application. My issue is that the map itself isn't comprised of DOM elements its a canvas that holds a ESRI GIS map. Anyone have any good tips for validating user interactions?
This thread is trying to answer question "How can I validate user interactions with an ESRI GIS map in a map application using Playwright?"
To validate the overall map, you can use Visual Regression Testing, the one provided by Playwright or Argos (https://argos-ci.com).
To click on the pin, it is harder. I suggest you to expose a global function in your code to get the coordinates of the pin:
window.getPinPosition = () => [232, 412]
Then you can call this function using
const coords = page.evaluate(() => window.getPinPosition())
Then you can use
page.mouse.click(...coords) to click on it. https://playwright.dev/docs/api/class-mouse#mouse-click
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email firstname.lastname@example.org.