I am trying to build a python script that captures my screen (a website will be opened), finds the coordinates of a text entry box on the displayed web site, and then clicks in that text entry box.
I am wondering how to achieve this.
I considered PyAutoGUI and OpenCV.
The text box I need to locate:
The example web site to find it in:
You can use the cv2.matchTemplate() function to match a template image (the image you want to find) with the live feed from your screen. The function returns a "result" image, which you can then use to find the location of the match using the cv2.minMaxLoc() function. Once you have the location of the match, you can extract the x and y coordinates and pass them to pyautogui.click() to simulate a mouse click at that location.