Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!