I would like to use Sikuli to automate both GUI apps and Web apps running within browser on Mac OS X and Windows. My purpose is currently less for testing, and more for GUI auto
There is an add-on called "Robust GUI Automation Library for Sikuli".
Even if you don't end up using the library, there are some really good lessons to be learned by looking at their implementation of the problem.
A few suggestions:
should I capture screen shots outside of Sikuli, and then slice/dice those images to pull out specific interface elements within Sikuli?
More important than how you get your elements is how those elements are stored. I standardize how I name graphics ie: Button_OK.png rather than Sikuli's unpredictable_default_name.png
You can add image libraries "on the fly" in your Sikuli script. Store different browser and platform graphics in different directories.
myImagePath = "M:\\myImageLibrary\\"
addImagePath(myImagePath)
how can I best keep track of screen shots for equivalent interface elements across similar GUI apps?
Naming conventions!
\\firefox\\Button_OK.png
\\IE8\\Button_OK.png
You can also play with the "similarity" of the Pattern to get the same graphic to hit on both IE and Firefox (but without false positives). This can take a bit of trial and error.
should I construct Python lists or dictionaries that contain screen shots?
This is a really good practice and has worked well for me in certain circumstances. Sometimes though, the filename is better documentation of the script functionality than a list offset.
I'm assuming in all of this that I could import the libraries like a Python module, which certainly seems possible from the documentation.
Yes you can import libraries.