← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #162881]: Groovy API

 

Question #162881 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/162881

    Status: Open => Answered

RaiMan proposed the following answer:
--- Symptom = Sikuli cannot find the image file
Sure, that the image file could not be found? Currently FindFailed exception does not distinguish between "cannot find the image file in the image search path" and "could not match the given image on the screen". So it might be a problem, that your image resolution does not match the VM's screen resolution.

--- What other weird behaviour have you seen when using VMs
There are some bug reports about strange behavior of Sikuli running in VM's.
I myself have some experience with Parallels (running Win7-32) and VirtualBox (running Ubuntu 10.10 64Bit) on Mac OS X 10.6. The main problems are with the overlay windows Sikuli is using in different situations (capture(), selectRegion(), highlight(), ...). And the timing is different, so you have to have really robust scripts.

--- enhance the image recognition engine to cope with things like windowing style changes
I know, that this feature is on the agenda. It might be an enhancement to the Pattern class, which would allow to define generic patterns like "application window" and it's elements, so you could say in your script:

this is not a specification;-)

aw = App("Firefox").window(x)
aw.windowType = "BROWSERWINDOW"
# aw at this point knows: it is a browser window of Firefox
aw.type(Pattern(aw.InputFieldURL()), "sikuli.org\n")
aw.click(Pattern(aw.CloseButton()))

and this works on Win/Mac/Linux.

Pattern(aw.InputFieldURL())
- gets application and window type from aw
- with this and InputFieldURL() gets a generic image id from a central repository (might be in the cloud), that is turned into a concrete image loaded from this central repository reflecting screen resolution, system environment and app specifics.

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