Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
A way to automate a click in instagram stories with javascript

I've been trying to develop a way into clicking an Instagram stories textarea, so it can open the "quick reactions" box using the DevTools.

I have been practicing this approach at many websites using just querySelector to get the element and a "click()" after, but it does not work in this case.

I've tried to select all parents of the textarea I want to click, hoping that one of them has an on-click function or something like that.

also tried to create a simulate click function using dispatchEvent at the element, something like this:

element.dispatchEvent(new MouseEvent(eventName, {
    view: window,
    bubbles: true,
    cancelable: true
  }));

Where in some cases, "eventName" could be "mouseup", "mousedown", "click".

Tried to get the coordinates of the element using getBoundingClientRect, and used it in a dispatchEvent to simulate another click, and while doing it, tried to calculate the center of the box using the position info.

None of these approaches worked, at this point, I'm just curious about what's happening here, I've been trying to automate many websites just for fun, and my goal here was to automate a click to open the quick reactions box and click a reaction.

Thanks for any response in advance, I would really like to have a better understanding of this.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda