Neil Smith
Neil Smith

Reputation: 1

Can I automate clicking on a specific button on a website?

I have to click a specific button on a website every hour.

Here is the button code I find by inspecting it.

<button id="disabledBump"
        class="solid-cta-button disabled"
        disabled=""
        style="display: inline-block;">Already bumped!</button>
<button id="bump"
        class="solid-cta-button"
        onclick="bump()"
        style="display: none;">Bump</button>

Upvotes: 0

Views: 861

Answers (2)

Victor Mata
Victor Mata

Reputation: 1

When I try this I get the following in the console

setInterval (() => document.getElementById('refreshInput').click(), 10006060); < 705

Upvotes: 0

Alexanderbira
Alexanderbira

Reputation: 444

Call .click() inside an interval:

setInterval(() => document.getElementById('bump').click(), 1000*60*60);

Upvotes: 1

Related Questions