def wait(self, imgfile, interval=0.5, max_retry=5): ''' wait until some picture exists ''' pt = base.wait_until(self.where, args=(imgfile,), interval=interval, max_retry=max_retry) if not pt: raise RuntimeError('wait fails') self._last_point = pt return
def wait(self, imgfile, seconds=20): ''' Wait until some picture exists @return position when imgfile shows ''' interval = 1 max_retry = int(seconds/interval) pt = base.wait_until(self.find, args=(imgfile,), interval=interval, max_retry=max_retry) if not pt: raise RuntimeError('wait fails') self._last_point = pt return pt
def wait(self, imgfile, interval=0.5, max_retry=5): ''' wait until some picture exists ''' pt = base.wait_until(self.where, args=(imgfile, ), interval=interval, max_retry=max_retry) if not pt: raise RuntimeError('wait fails') self._last_point = pt return