sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03814
[Question #163900]: Function to select image dict.
New question #163900 on Sikuli:
https://answers.launchpad.net/sikuli/+question/163900
Hi!
I got a file containing various sets of image dictionaries. I want to make a function which can be executed in a test class in order to set which set of images that would be used in the specific test(different resolutions etc.). Of course I am doing all imports an so on.
At current state I got this function but can not really get it working. Where I want "theMap" to be a parameter set to the specific dictionary while using the function in a test.
def selectGuiMap(theMap):
guiMap = sikuliWrapper.ImageDict(guiMapSikuli.theMap)
myMap = guiMap.getImage
I got this function in one file and are then importing it to a test class which is in another file.
Is that the problem? In the test class the execution of the function looks like this:
def TestClass(unittest.TestCase):
#skipping the setUp/tearDown, thoose functions are there in real script.
def test_funcElement(self):
try:
selectGuiMap(specificImageDict)
except:
print "Fail" #or Exception or whatever who indicates something is wrong.
After this I got some other functions which is supposed to use images form the dict.
Do I have to run the selectGuiMap(theMap) in start of every test function?
Have a nice day :-)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.