]> www.fi.muni.cz Git - evince.git/blob - test/test6.py
cleanup
[evince.git] / test / test6.py
1 #!/usr/bin/python
2
3 # Test printing
4
5 import os
6 os.environ['LANG']='C'
7 srcdir = os.environ['srcdir']
8 homedir = os.environ["HOME"] + "/";
9
10 from dogtail.procedural import *
11
12 if os.path.exists(homedir + "output.ps"):
13     os.unlink(homedir + "output.ps")
14
15 run('evince', arguments=' '+srcdir+'/test-page-labels.pdf')
16
17 click('File', roleName='menu')
18 click('Print...', roleName='menu item')
19
20 focus.dialog('Print')
21 click('Print to File', roleName='table cell', raw=True)
22 click('Print', roleName='push button')
23
24 statinfo = os.stat (homedir + "output.ps")
25 if statinfo.st_size > 100000:
26     exit(1)
27 os.unlink (homedir + "output.ps")
28
29 # Close evince
30 click('File', roleName='menu')
31 click('Close', roleName='menu item')