test1.py 868 Bytes
Newer Older
1 2
#!/usr/bin/python

3
# This test opens the interface and just clicks around a bit.
4

5
import os
6
os.environ['LANG']='C'
7

8
from dogtail.procedural import *
9 10 11

run('evince')

12
# Test file->open
13 14 15 16
click('File', roleName='menu')
click('Open...', roleName='menu item')
focus.dialog('Open Document')
click('Cancel', roleName='push button')
17 18 19

# Toolbar editor
click('Edit', roleName='menu')
20 21 22
click('Toolbar', roleName='menu item')
focus.dialog('Toolbar Editor')
click('Close', roleName='push button')
23 24 25

# About dialog
click('Help', roleName='menu')
26
click('About', roleName='menu item')
27
focus.dialog('About Document Viewer')
28 29 30
click('Credits', roleName='push button')
focus.dialog('Credits')
click('Close', roleName='push button')
Nickolay V. Shmyrev's avatar
Nickolay V. Shmyrev committed
31
focus.dialog('About Document Viewer')
32 33
click('Close', roleName='push button')

34 35 36
# Close evince
click('File', roleName='menu')
click('Close', roleName='menu item')