← Back to team overview

sikuli-driver team mailing list archive

[Question #294140]: re-use image name

 

New question #294140 on Sikuli:
https://answers.launchpad.net/sikuli/+question/294140

Hi there,

As I want to test my application in different browsers, i've created (so far) two different classes
firefoxTestImages():
chromeTestImages():

	imgDict = {}
	
	def __init__(self):
		self.imgDict = {}
		self.addImage("checkbox", "checkbox.png")
		self.addImage("okButton", "okButton.png")
	
        		
	def addImage(self, name, img):
		self.imgDict[name] = img
		
	def getImage(self, name):
		return self.imgDict[name]


The image names for both classes are exactly the same (except the image).
The import seems to be working fine, but when I switch from chrome to firefox it does not recognize the image anymore, just because it is still trying to find the chrome version.

Is using the reload() function the way forward, what would be the best solution for this? 


Regards,
Sander

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.