Reputation: 41
Using mac
import time
time.sleep(10.4)
a=pyautogui.locateOnScreen('/Users/husaynjaffer/Dropbox/Mac/Desktop/Screen Shot 2021-07-17 at 1.22.32 AM.png', grayscale=False, confidence =.5)
print(a)
returns None
expected: "location of the file on screen"
any ideas to debug or fix anyone with the same issue
Upvotes: 1
Views: 631
Reputation: 11407
It means that the image was not located on the screen, check out the code. To debug it you have to step through the function and check where it goes wrong.
Upvotes: 1