Back to Blog

Smart HTML vs Coordinate Clicking: Which Should You Use?

Clicking a web element by selector vs clicking a fixed coordinate: how each works, the trade-offs, and a simple rule for choosing the reliable option every time.

When you automate anything on screen, you have to tell the software *where* to act. There are two ways to do it: click a fixed X/Y coordinate, or target the actual element by its selector. The choice looks minor, but it's the single biggest reason a workflow either keeps running for months or breaks the next morning. This article explains how clicking a web element by selector differs from coordinate clicking, and when to use each.

You'll see how each approach works under the hood, a point-by-point comparison, the pros and cons, and a simple rule for choosing. If you've ever had an automation that 'worked yesterday' and mysteriously missed today, this is almost always why.

In this guide you'll learn: how coordinate clicking and selector-based Smart HTML actually work, their trade-offs, and a simple rule for picking the right one.

The real problem: telling automation *where* to act

Humans find a button by reading the screen. Automation can't 'see' like that — it needs an address. A coordinate says 'click at pixel 640, 320.' A selector says 'click the element named submit-button.' Same intent, very different reliability, because screens move but element identities usually don't.

How coordinate clicking works

Coordinate clicking records a pixel position and clicks there. It's universal — it works on anything visible, including images, games, and apps with no accessible structure. But it's fragile: change the window size, resolution, scroll position, or layout, and the target is no longer under those pixels. The click lands on empty space or the wrong control.

How Smart HTML (selector-based) works

On web pages, Smart HTML targets an element by its selector instead of its position. It asks the page for the element that matches a selector and acts on it wherever it currently sits. Combined with Wait for element and IF element, it can wait for content to load and branch when something is missing — the page can shift and the workflow still finds its target.

Smart HTML vs coordinate clicking, point by point

Stability when layout changes: Smart HTML keeps working; coordinates break.

Works on non-web targets: coordinates work anywhere; Smart HTML is for web pages.

Handles dynamic loading: Smart HTML can wait for elements; coordinates fire blindly.

Setup effort: coordinates are quick to capture; selectors take a moment to identify but pay off long-term.

Runs in the background: Smart HTML drives background Chrome over CDP without the real cursor; coordinate clicks use the physical mouse.

Pros and cons

Coordinate clicking

Good for anything without accessible structure — desktop apps, images, games, canvas UIs. Weak at surviving layout, resolution, or scroll changes, and at running unattended while you use the machine.

Smart HTML

Good for reliable, low-maintenance web automation that survives redesigns and runs in the background. Weak at non-web targets, which it can't address.

When to use which

The simple rule: if it's a web page, use Smart HTML; if it's not, use coordinates. For websites, forms, dashboards, and portals, selectors give you durability and background execution. For desktop software, games, or image-based targets with no structure to grab, coordinate clicking — often paired with image recognition — is the right tool. Many real workflows combine both.

Real-world example

Imagine a workflow that logs into a web dashboard and clicks 'Export.' With coordinates, it works until the site adds a banner that pushes everything down 60 pixels — now it clicks the wrong thing. With Smart HTML, it targets the Export element by selector, so the banner doesn't matter and the click lands every time.

Frequently asked questions

Is Smart HTML always better than coordinates?

Only for web pages. For desktop apps, games, or anything without web structure, coordinates or image matching are the way to go.

Do I need to know CSS to use Smart HTML?

No — RunMacro helps you capture the selector, so you don't have to write it by hand.

Can I mix both in one workflow?

Yes. Use Smart HTML for the web parts and coordinate or image steps for the desktop parts of the same workflow.

Why did my coordinate-based automation suddenly break?

Usually a change in window size, resolution, scroll, or layout moved the target. This is exactly the fragility selectors avoid.

Conclusion

Coordinate clicking is universal but brittle; Smart HTML is web-only but durable and background-friendly. Match the tool to the target: selectors for the web, coordinates for everything else. Get that choice right and your automations stop mysteriously breaking overnight.

To put selectors to work, see how to extract data from websites or auto-fill Google Forms in the background. Want the bigger picture? Compare desktop vs browser automation, then download RunMacro to try both.

RunMacro robot

Ready to automate smarter?

Turn what you just read into real automation workflows.