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

151
Visualizações
chrome extension click on absolute position

I am trying to develop a chrome extension that can click on an absolute position in all tabs. Things are going really well, but I've run into one major problem that prevents me from packing this up and calling it a day.

I am running this code: document.elementFromPoint(600, 303).click();

with Chrome executeScript, I can do this on every tab and it works great.... as long as the page is pure HTML...

chrome.tabs.query({}, function (tabs) {
    for (var i = 0; i < tabs.length; i++) {
        chrome.tabs.executeScript(tabs[i].id, {code: 'document.elementFromPoint(600, 303).click();'});
    }
}
);

So here's the problem: Some of the pages that I want to run this on are not pure HTML and I'm doomed. I think that this approach has problems when it's a javascript page because my code appears to evaluate a document page rather than an applet. Either that, or it could be some odd XSS protection or something.

Is there javascript code or a chrome API that will allow me to simulate a left mouse click at a position in a tab regardless of what is loaded in there?

I'd appreciate any help if someone knows. I have been racking my brain for weeks. Nothing works.

Thanks.

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