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

281
Views
Is there a mathematical way/programmatic way to convert between .getBoundingClientRect() coordinates and pyautogui's position system?

I want to be able to get an elements position on the screen of my computer then click it using pyautogui. However the only current way to do this reliably is to use puppeteer(pyppeteer) and screenshot the element then click it with pyautogui's png system.

Pyautogui's position system is always slightly off if I put in the coordinates that getBoundingClientRect() spits out for the element, I suspect it's to do with offsets for my taskbar etc but I want to be able to consistently convert between the two coordinate systems no matter the sizing of the webpage (whether it's a small box or full screen).

Is there python methods /ways of doing this?

For an example of the javascript code: document.querySelector("<class name>").getBoundingClientRect() which can be run in inspect element on chromium browsers etc.

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!