Skip to content

[Question] Is it possible to view the location of a mouse click in the debugger / inspector? #16546

Closed
@vomc

Description

@vomc

I have a super rare edge case where I need to do a test on a Mapbox canvas and click on something based on location, i.e. await page.mouse.click(215, 289)

The problem is that I don't know the exact position of the canvas element that I need to click on, so I need a way to view where a click at say 215, 289 actually took place on the page. In cypress this is quite simple, you can trigger the click command just like Playwright and then the debugger will show you where that click took place by rendering a red dot at the location. This makes it quite simple to using basic trial and error ensure you are at the exact location: https://docs.cypress.io/api/commands/click

Is something like that also possible in Playwright, i.e. provide a debug view in which you can see the location of a given click?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions