如何每天自动点击网站上的按钮

How to automatically click a button on a website on daily basis

我的目标是每天点击特定网站上的特定按钮(例如:12:00 下午)。

这个应该是全自动的,我是说,我的电脑可能是on/off。

能否请您提出一个解决方案,以及如何做到这一点的想法?

注:我要用JS

谢谢。

它有一个名字——Crawler。 您可以使用 Puppeteer 库创建无头 Web 浏览器并模拟任何类型的操作。

产品可能在 public 服务器上,例如 Heroku 或 Deta。

Puppeteer dev web documentation

你也可以使用setInterval

setInterval(function(){ alert("Hello"); }, 8.64e+7);

此函数每 24 小时执行一次。

TestCafe (https://testcafe.io) is my tool of choice for this purpose. Once setup, the schedule can be automated with something like node-cron