本文整理汇总了Python中org.sikuli.script.Region.wait方法的典型用法代码示例。如果您正苦于以下问题:Python Region.wait方法的具体用法?Python Region.wait怎么用?Python Region.wait使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.sikuli.script.Region
的用法示例。
在下文中一共展示了Region.wait方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: wait
# 需要导入模块: from org.sikuli.script import Region [as 别名]
# 或者: from org.sikuli.script.Region import wait [as 别名]
def wait(self, target, timeout=None):
if isinstance(target, int) or isinstance(target, long):
target = float(target)
if timeout == None:
return JRegion.wait(self, target)
else:
return JRegion.wait(self, target, timeout)
示例2: wait
# 需要导入模块: from org.sikuli.script import Region [as 别名]
# 或者: from org.sikuli.script.Region import wait [as 别名]
def wait(self, target, timeout=None):
if isinstance(target, int) or isinstance(target, long) or isinstance(target, float):
time.sleep(target)
return
if timeout == None:
ret = JRegion.wait(self, target)
else:
ret = JRegion.wait(self, target, timeout)
return ret
示例3: wait
# 需要导入模块: from org.sikuli.script import Region [as 别名]
# 或者: from org.sikuli.script.Region import wait [as 别名]
def wait(self, target, timeout=None):
ttype = __builtin__.type(target)
if ttype is types.IntType or ttype is types.FloatType:
time.sleep(target)
return
if timeout == None:
ret = JRegion.wait(self, target)
else:
ret = JRegion.wait(self, target, timeout)
return ret
示例4: wait
# 需要导入模块: from org.sikuli.script import Region [as 别名]
# 或者: from org.sikuli.script.Region import wait [as 别名]
def wait(self,target, timeout=0.0):
addFoundImage(getFilename(target))
try:
return SikuliRegion.wait(self,target, timeout)
except FindFailed, e:
self.log.html_img("Find Filed", getFilename(target)) #"images/" + getFilename(target))
self.log.screenshot(msg="Region", region=(self.getX(), self.getY(), self.getW(), self.getH()))
raise e