The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Member-only story

How to Automate Clicks Using JavaScript

Thomas Molnar-Brock
The Startup
Published in
3 min readMar 17, 2020

--

Dated Computer Mouse
Image Credit: @shagal_sajid on Unsplash

If you are like me, you probably use a computer at least once a day. Maybe even several. Of the time you spend on your computer, I’m willing to wager that a large portion is spent online. Of that time, quite a lot might be spent clicking on stuff. This guide will show you how to click in an easier, less repetitive way, which can be easily customized to your precise clicking needs.

Step One: Fire Up Google Chrome

I will demonstrate this by creating a simple function to click a button on this website I built, but you should be able to use the idea we are working on for a wide-variety of custom-clicking tasks.

The first thing to do is to open your Chrome browser. Then, navigate to a website on which you want to click the same button multiple times.

Step Two: Gain Access to The Mainframe (Well Actually Just The JS Console)

Open the console by right-clicking the element you wish to automate clicks for and selecting the inspect option. You should see a lot of highlighted lines of HyperText Markup Language (HTML).

--

--

The Startup
The Startup

Published in The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Thomas Molnar-Brock
Thomas Molnar-Brock

Written by Thomas Molnar-Brock

I like to write about technology and personal growth.

Responses (5)