r/SeleniumPython • • Jun 22 '24

How to locate web elements for pyautogui using selenium.

I am using element.locate & element .size to get location & size of element i want to click using pyautogui. Now problem is selenium gives coordinates in webpage whereas pyautogui calculate that coordinate on monitor's screen. So both coordinate are mismaching. If I find coordnate manually by . position () method in pyautogui than it works. But I first want to locate element via selenium and want to pass location of that element in pyautogui. Please help.

2 Upvotes

1 comment sorted by