--- title: "Simulate a click at specific coordinates" slug: "simulate-a-click-at-specific-coordinates" updated: 2025-05-30T04:01:32Z published: 2025-05-30T04:01:32Z canonical: "helpcenter.autify.com/simulate-a-click-at-specific-coordinates" --- > ## Documentation Index > Fetch the complete documentation index at: https://helpcenter.autify.com/llms.txt > Use this file to discover all available pages before exploring further. # Simulate a click at specific coordinates Some websites use images or `<canvas>` elements where clicking on a specific part of the element is required to trigger an action, for example, clicking on a specific area of a map, chart, or image-based button. ## How to set it up 1. Create a “Click element” step that targets the image or `<canvas>` element. By default, Playwright will click the center of the element. 2. Convert the “Click element” step into a Playwright code step and specify the coordinates like the following: ```typescript await page.getByRole("button", {name: "My Image Button"}).click({position: {x: 40, y: 40}}) ``` Adjust `x` and `y` to the specific point you want to click, measured in CSS pixels from the top-left corner of the element. You can find the element’s size and position by using your browser’s element inspector. This will help you estimate the correct coordinates to click within the element. ![](https://cdn.document360.io/c040854c-2c75-49d0-98e1-43f462e8657e/Images/Documentation/image(133).png?sv=2026-02-06&spr=https&st=2026-10-27T21%3A34%3A22Z&se=2026-10-27T22%3A34%3A22Z&sr=c&sp=r&sig=PcUblrsMvsH60upk%2BRoumDeC7fAyJ64drf4Nm%2Bi5oGk%3D)