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

278
Vistas
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
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