Dogtail: A GUI Test Tool William Cohen NCSU CSC 591W March 17, 2008
What is Dogtail? A GUI test tool and automation framework Written in Python Uses Accessibility (a11y) technologies to communicate with desktop applications Dogtail scripts written in Python and executed like any other Python program
Assistive Technology Service Provider Interface (AT-SPI1) Gnome Accessibility Project component Make interface more flexible: Allow visual cues inplace of audio for hearing impaired Allow screen reader and magnification for visually impaired Provides hooks for other access method
Dogtails interface into GUI Dogtail make use of the AT-SPI interface to determine what is on screen Avoid issues “screen scraping”: Issues where mouse should be located Converting pixels back into text GUI application being needs to use AT-SPI Desktop needs to have accessibility enabled
Dogtail Installation Requirement: AT-SPI-enabled desktop Python 2.3 or higher ImageMagick 6.2 or higher rpm-python or python-apt ElementTree for Python pyspi - Python AT-SPI bindings On most distributions Dogtail package should automatically pull in other required packages: yum install dogtail apt-get dogtail Need to turn on assistive technology and restart X
Dogtail Sniff Utility Provides graphical view of AT-SPI information Can expand and collapse view of items
Sniff Demo
Dogtail Recorder Utility Provides an easy way to record operations performed Generates a dogtail python script Resulting script can be saved Script can be modified for various purposes
Recorder Demo
Dogtail Scripts Written in Python Import the needed Dogtail modules Two script flavors: Procedural Object oriented
Running GUI Applications Without Display Some test machines do not have displays (“headless”) Dogtail has ability to run on those machine: Use dogtail-run-headless command
Further Reading http://www.redhat.com/magazine/020jun06/features/dogtail/ http://www.redhat.com/magazine/021jul06/features/dogtail/ http://www.redhat.com/magazine/022aug06/features/dogtail/ http://people.redhat.com/zcerza/dogtail/