#!/usr/bin/python
from dogtail.procedural import *

focus.application('gnome-panel')
focus.frame('Top Panel')
click('Applications', roleName='menu')
click('Virtual Machine Manager', roleName='menu item')
focus.application('virt-manager.py')
focus.dialog('Open connection')
click('Connect', roleName='push button')
focus.frame('Virtual Machine Manager (Xen: localhost)')
activate('Domain-0', roleName='table cell')
click('Open', roleName='push button')
focus.frame('Domain-0 Virtual Machine Console')
click('Virtual Machine', roleName='menu item')
click('Close', roleName='menu item')
focus.frame('Virtual Machine Manager (Xen: localhost)')
click('File', roleName='menu item')
click('Quit', roleName='menu item')
