11# -*- coding: utf-8 -*-
22"""
3- Copyright (C) 2012-2022 Diego Torres Milano
3+ Copyright (C) 2012-2023 Diego Torres Milano
44Created on oct 6, 2014
55
66Licensed under the Apache License, Version 2.0 (the "License");
3838from com .dtmilano .android .uiautomator .uiautomatorhelper import UiAutomatorHelper
3939from com .dtmilano .android .viewclient import ViewClient , View , VERSION_SDK_PROPERTY
4040
41- __version__ = '22.6.0 '
41+ __version__ = '22.6.1 '
4242
4343import sys
4444import threading
9494DEBUG = False
9595DEBUG_MOVE = DEBUG and False
9696DEBUG_TOUCH = DEBUG and False
97- DEBUG_POINT = DEBUG and False
98- DEBUG_KEY = DEBUG and False or False
97+ DEBUG_POINT = DEBUG and True
98+ DEBUG_KEY = DEBUG and False
9999DEBUG_ISCCOF = DEBUG and False
100100DEBUG_FIND_VIEW = DEBUG and False
101101DEBUG_CONTEXT_MENU = DEBUG and False
@@ -733,7 +733,7 @@ def findTargets(self):
733733 # if self.vc:
734734 # self.vc.traverse(transform=self.populateViewTree)
735735
736- def getViewContainingPointAndGenerateTestCondition (self , x , y ):
736+ def getViewContainingPointAndGenerateTestCondition (self , x : int , y : int ):
737737 if DEBUG :
738738 print ('getViewContainingPointAndGenerateTestCondition(%d, %d)' % (x , y ), file = sys .stderr )
739739 self .finishGeneratingTestCondition ()
@@ -754,13 +754,16 @@ def getViewContainingPointAndGenerateTestCondition(self, x, y):
754754 self .printOperation (v , Operation .TEST , text )
755755 break
756756
757- def findViewContainingPointInTargets (self , x , y ):
757+ def findViewContainingPointInTargets (self , x : int , y : int ):
758758 if self .vc :
759759 vlist = self .vc .findViewsContainingPoint ((x , y ))
760760 if DEBUG_FIND_VIEW :
761761 print ("Views found:" , file = sys .stderr )
762- for v in vlist :
763- print (" " , v .__smallStr__ (), file = sys .stderr )
762+ if vlist :
763+ for v in vlist :
764+ print (" " , v .__smallStr__ (), file = sys .stderr )
765+ else :
766+ print (f" list is empty. No views found containing point ({ x } ,{ y } )" , file = sys .stderr )
764767 vlist .reverse ()
765768 for v in vlist :
766769 if DEBUG :
0 commit comments