← Back to team overview

sikuli-driver team mailing list archive

[Question #671266]: creating an image lib

 

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

Hi there,

I've been using sikulix for some time on a windows machine and worked perfectly.
Now I am using a iOS and finished setting up sikulix again and runs ok.

What I am trying to do is capturing images save them in a folder and trying to give them proper names.
This is what I did:
--
from sikuli import *
from sikuli.Sikuli import *

class testImages():

	imgDict = {}
	
	def __init__(self):
		self.imgDict = {}
		
		self.addImage("someTestImage", "someTestImage.png")
                #and like to extend this list with images

		
        def addImage(self, name, img):
            self.imgDict[name] = img

        def getImage(self, name):
            return self.imgDict[name]
--

Than created the following:
--
from sikuli import *
from testImages import *
from sikuli.Sikuli import *

switchApp("Safari")
wait("someTestImage")
--

[error] RunTimeIDE: ImageMissing: someTestImage

Using Windows, saving the class testImages(), it would create me a .py, .html and a py.class
Now when I save the testImages class on my iOS it only creates a .sikuli file.

When I capture images using the EDI the scripts runs ok, but the images captured do have this 3495374599345.png as filename (and not sure where they are stored)

Could you please help me out here?

So basically I want to save images manually with a proper name and create them only once.

Thanks in advance.

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