Ejemplo n.º 1
0
	def dragDrop(self, target, dropTarget):
		self.log.html("DragDrop " + getFilePath(target.__str__()) + " to " + dropTarget.__str__() + " in region")
		try:
			SikuliRegion.wait(target,config.elementWaitTime)
			return SikuliRegion.dragDrop(self, target,dropTarget)
		except FindFailed, e:			
			self.log.html_img("Find Failed : " + getName(target.__str__()), getFilePath(target.__str__()))
			self.log.screenshot(msg="Region", region=(self.getX(), self.getY(), self.getW(), self.getH()))
			raise e		
Ejemplo n.º 2
0
	def hover(self, target):
		self.log.html("Hovering on " + getFilePath(target.__str__()) + " in region")
		try:
			SikuliRegion.wait(target,config.elementWaitTime)
			return SikuliRegion.hover(self, target)
		except FindFailed, e:			
			self.log.html_img("Find Failed : " + getName(target), getFilePath(target))
			self.log.screenshot(msg="Region", region=(self.getX(), self.getY(), self.getW(), self.getH()))
			raise e			
	def click(self, target, modifiers=0):
		try:
			return SikuliRegion.click(self, target, modifiers)
		except FindFailed, e:			
			self.log.html_img("Find Filed", "images/" + getFilename(target))
			self.log.screenshot(msg="Region", region=(self.getX(), self.getY(), self.getW(), self.getH()))
			raise e
Ejemplo n.º 4
0
	def wait(self, target, timeout=60):
		self.log.html("Waiting for " + getFilePath(target.__str__()) + " in region")
		try:
			return SikuliRegion.wait(self, target, timeout)
		except FindFailed, e:			
			self.log.html_img("Find Filed : " + getName(target.__str__()), getFilePath(target.__str__()))
			self.log.screenshot(msg="Region", region=(self.getX(), self.getY(), self.getW(), self.getH()))
			raise e
Ejemplo n.º 5
0
	def findAll(self, target):
		self.log.html("Finding All " + getFilePath(target.__str__()) + " in region")
		try:
			return SikuliRegion.findAll(self, target)
		except FindFailed, e:			
			self.log.html_img("Find Failed : " + getName(target), getFilePath(target))
			self.log.screenshot(msg="Region", region=(self.getX(), self.getY(), self.getW(), self.getH()))
			raise e
 def click(self, target, modifiers=0):
     try:
         return SikuliRegion.click(self, target, modifiers)
     except FindFailed, e:
         self.log.html_img("Find Filed", "images/" + getFilename(target))
         self.log.screenshot(msg="Region",
                             region=(self.getX(), self.getY(), self.getW(),
                                     self.getH()))
         raise e
	def exists(self, target, timeout=None):
		img = getFilename(target)
		reg = (self.getX(), self.getY(), self.getW(), self.getH())
		addFoundImage(img, reg)
		return SikuliRegion.exists(self, target, timeout)
Ejemplo n.º 8
0
	def waitVanish(self, target, timeout=60):
		self.log.html("Waiting for " + getFilePath(target.__str__()) + " to vanish in region")
		return SikuliRegion.waitVanish(self, target, timeout)
Ejemplo n.º 9
0
	def exists(self, target, timeout=10):
		self.log.html("Exists? " + getFilePath(target.__str__()) + " in region")
		img = getFilePath(target)
		reg = (self.getX(), self.getY(), self.getW(), self.getH())
		addFoundImage(img, reg)
		return SikuliRegion.exists(self, target, timeout)
Ejemplo n.º 10
0
 def exists(self, target, timeout=None):
     img = getFilename(target)
     reg = (self.getX(), self.getY(), self.getW(), self.getH())
     addFoundImage(img, reg)
     return SikuliRegion.exists(self, target, timeout)