Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

265
Vistas
How do I make a div click without the mouse moving?

I'm trying to make a JavaScript code that injects into cpstest.org and when you click the start button, it automatically starts auto-clicking. I tried to make a script for it, but it just didn't work.

The start button has id start but I don't know the element to click. Viewing source code or using dev tools would be helpful, but those are blocked on my computer.

let i = 1;

document.querySelector('#start').addEventListener('click', function() {
    i = 0;
});

function repeat() {
    if (i == 0) {
        document.querySelector(unknownId).click()}; 
        requestAnimationFrame(repeat)
    }
};

repeat();
about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Here's a solution:

// speed - how many CPS you want
// duration - how long the test is (in seconds)
const rapidClick = (speed, duration) => {
    const startButton = document.querySelector('button#start');
    const clickArea = document.querySelector('div#clickarea');

    // Start the test
    startButton.click()

    // Click the clickArea on an interval based on the "speed" provided
    const interval = setInterval(() => clickArea.click(), 1e3 / speed);

    // Clear the interval after the duration has passed
    setTimeout(() => clearInterval(interval), duration * 1e3);
}

// Do 100 CPS for 5 seconds
rapidClick(100, 5)

I noticed that even when setting the speed parameter to something insane like 1000 CPS, the test says only 133-139 clicks per second. Seems like it caps off at 139. Hope this helps.

about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda