GUI discovery
Project description
discogui discovers GUI elements
- Links:
documentation: http://discogui.readthedocs.org
- Features:
python module
works on Linux
does not depend on Accessibility technologies
toolkit independent
only basic tests on very simple GUI
GUI should be displayed on Xvfb or Xephyr
- Known problems:
Python 3 is not supported
slow
- Possible applications:
automatic GUI testing
automatic GUI control
Basic usage
from discogui.buttons import discover_buttons from easyprocess import EasyProcess from pyvirtualdisplay import Display with Display(): with EasyProcess('zenity --question') as p: p.sleep(1) buttons = discover_buttons() print buttons
Installation
General
Ubuntu 14.04
sudo apt-get install python-pip xvfb python-xlib scrot python-pil xdotool sudo pip install https://github.com/pepijndevos/PyMouse/zipball/master sudo pip install discogui
Uninstall
# as root pip uninstall discogui
Usage
basic
Code:
#-- include('examples/basic.py')--# ''' 1. start zenity Yes/No dialog on Xvfb 2. discover buttons using :mod:`discogui.buttons` module 3. print rectangles ''' from discogui.buttons import discover_buttons from easyprocess import EasyProcess from pyvirtualdisplay import Display def main(): with Display(visible=0): with EasyProcess('zenity --question') as p: p.sleep(5) buttons = discover_buttons() print( buttons ) if __name__ == '__main__': main() #-#
Output:
#-- sh('python -m discogui.examples.basic 2>/dev/null')--# [ScreenRect((582,407,667,442)), ScreenRect((491,407,576,442))] #-#
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
discogui-0.1.tar.gz
(47.6 kB
view hashes)