Monday, April 11, 2016

Get Operating System used by SikuliX

If we write SikuliX code to check app on different operating system, we may need to define characteristic for each OS (e.g. image library or specific code). To check it, we can use built-in SikuliX script. Following is an example of OS checking

if Settings.isWindows():
    print "I am running on Windows"
elif Settings.isLinux():
    print "I am running on Linux"
elif Settings.isMac():
    print "I am running on Mac"

That's it. Hope it helps.

No comments: