asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.5k stars 1.27k forks source link

click item in a dropdown menu , not working #838

Open aditya11ad opened 9 months ago

aditya11ad commented 9 months ago

in this case i want to click on Paste in "Notepad":

image

these are ss: 1.png: 1 2.png: 2 i am using this code:

time.sleep(2) //switch to app
ss_images=['1.png','2.png']
for img in ss_images:
    time.sleep(.4)
    x,y = pyautogui.locateCenterOnScreen(img)
    pyautogui.moveTo(x,y)
    pyautogui.click(x,y)

I am able to click on Edit, but then Past is not being click . please provide the generalized solution.

darkb0ts commented 8 months ago

It 100% working well for me , please give Image Quality good