RGUILS: Robust GUI Automation Library for Sikuli
- ro-gels = [roʊgəls]
- ra-gils = [rɑ:gɪls]
RGUILS is a python library for robust GUI automation with Sikuli. It provides an object-oriented API to model GUI elements, such as sets of buttons, checkboxes, radio buttons, windows and dialogue hierarchies for GUI automation and testing, all in a robust way.
RGUILS enables you to write object-oriented APIs to automate any sequence of actions in complex graphical user interfaces robustly with relatively little code, rather than just automate fixed UI interaction sequences.
Say you have an application with three buttons Back, Next, Cancel that you want to automate.
Create a Sikuli project with constants for the images of all your buttons in different states:
Tell RGUILS where to find your Sikuli project. Put the following line in sikuliimport\settings.py
:
SIKULI_PROJECT_DIRS = ['C:\\Documents and Settings\\username\\Sikuli\\buttons.sikuli']
Now you can use your button images to automate the buttons of your application in a robust way. RGUILS automatically groups your button images by button type, detects which buttons exist on the screen and whether they are enabled or disabled, and lets you click on them:
from seagull.images import IMG_BUTTONS, IMG_BUTTONS_DISABLED
from seagull.buttons import Buttons
# define buttons
buttons = Buttons(IMG_BUTTONS, IMG_BUTTONS_DISABLED)
# locate buttons on the screen
buttons.find_buttons()
buttons.waitUntilButtonIsEnabled('next', 15)
buttons.click('next')
To learn how to use RGUILS, read the SampleInstaller tutorial. To start using RGUILS, please visit the GettingStarted page. To learn more about Sikuli, read this Sikuli overview. For a more in-depth discussion of GUI automation issues, read this page about robust GUI automation.