Home>

I want to click on any image on the website after image recognition.

Click "Google Search" on the Google Top page)
Any image (search.png):

# I felt like it could be solved with actionchains, but I don't know how to specify the target element. . . .
element = "search.png"
action = webdriver.common.action_chains.ActionChains (driver)
action.move_to_element_with_offset (element, 0, 0)
action.click ()
action.perform ()

I tried the pyautogui module with reference to the following, but
How to use PyAutoGUI Screenshot/Image authentication
https://bit.ly/34JsTH5

"TypeError: cannot unpack non-iterable NoneType object"
Since we were unable to resolve the error, we are looking for another method.

Other ways are acceptable, so please let me know the solution or reference site.
Thanks for your cooperation.