I have made a Sikuli program for Google Chrome (Windows), will it work on Google Chome (MAC)?

Asked by Jeff Sant

Dear Raiman,

I have made a Sikuli program for Google Chrome (Windows), will it work on Google Chome (MAC)?

Is there any way i can test how it will look in mac? any virtual environment, emulator or so?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

--- will it work on Google Chome (MAC)?

principally yes.

restrictions:
-- things like switchApp(), ... and the App class work different on Win (window title oriented) and Mac (app oriented)
-- keyboard shortcuts used with type() are different (e.g. crtl-L vs cmd-L to jump to url entry)
-- app specific differences in the GUI

So if you want to make your script aware of the environment it is running on, you can use
http://sikuli.org/docx/globals.html#Env.getOSVersion

together with functions, that handle the differences.

a quick and dirty example:

def kbCtrl(key):
    if Env.getOS() = OS.MAC:
        type(key, KEY_CMD)
    else:
        type(key, KEY_CTRL)

--- images
You have to take care, that the images in the browser window on the different systems are rendered the same way pixel by pixel. If this is not the case, you have to manage two sets of images and switch the sets accordingly.

--- test it
If you do not have a Mac or someone who has one, where you can do it: no chance.

I you have a DVD of MAC OSX 10.6 SnowLeopard, you can run this in a VMBox on Windows7. But the environment is restricted and might make more problems, than it is worth.

Another possibility: Find someone who has the appropriate environment and ask him to let you play on his system using some remote access (TeamViewer, Skype, ...).
I just think, that this is a good idea: making one of my Macs accessible over the net for such purposes. Since I already switched to Lion, which has much more capabilities here, I will test it the next days. For now though, this does not help you, sorry.

Revision history for this message
Jeff Sant (sant-jeff) said :
#2

Thanks RaiMan, that solved my question.