Re: [Sikuli-driver] [Question #270616]: How to clear the loaded images in sikuli

2015-08-21 Thread RaiMan
Question #270616 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270616

Status: Open = Answered

RaiMan proposed the following answer:
the problem in your case is the ImagePath.

each ImagePath.add() adds the path to the end of the list.

so the images are always found in the path added first.

In your case the easiest solution is to use
ImagePath.setBundlePath(Constants.IMG_DIR + browser);

instead of ImagePath.add()

because ImagePath.setBundlePath() always overwrites the first entry in
the image path list.

BTW: the concept you have chosen is exactly the one that should be used.
In version 2 I will support this even better with an ImageGroup concept
based on folder structures and option files.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #270616]: How to clear the loaded images in sikuli

2015-08-21 Thread RaiMan
Question #270616 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270616

RaiMan posted a new comment:
Another possibility is to do the following in some batch scenario like
unittest:

- in a setup for the testcase use ImagePath.add(path)
- in a teardown after testcase completion use ImagePath.remove(path)

This currently would be the solution, if more than one path changes from
testcase to testcase

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #270616]: How to clear the loaded images in sikuli

2015-08-20 Thread Naidu
New question #270616 on Sikuli:
https://answers.launchpad.net/sikuli/+question/270616

Here is my following scenario.

I have to automate same tests in 4 different browsers.
I divided the images into 4 categories and all the images are with same name.
Each browser has a separate class  load the images in their respective 
directories.

ImagePath.add(Constants.IMG_DIR + browser);

When i run each browser tests individually everything went well.

The issue arise when i run all browser tests in a batch. because each browser 
folder contains the same image names, sikuli won't  load the images again.

Is there any reload Or unload methods available which can clear the cache of 
images that are already loaded in sikuli?

Or is there any other way which can be used to avoid these.

The last option is to rename the images, which is not an easy task for me as it 
involves good amount of changes.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp