Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pygats/pygats.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def locate_on_screen(ctx: Context, img_path: str):
"""
try:
coord = pyautogui.locateOnScreen(img_path, confidence=0.5)
except pyautogui.ImageNotFoundException:
except (pyautogui.ImageNotFoundException, OSError, TestException):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

С OSError надо разобраться, но откуда тут взялся TestException?

failed(msg='Изображение не найдено')
ctx.formatter.print_para(f'Изображение найдено в координатах {coord}')
return coord
Expand Down