summaryrefslogtreecommitdiff
path: root/test/test6.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test6.py')
-rwxr-xr-xtest/test6.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/test6.py b/test/test6.py
new file mode 100755
index 00000000..89b6e5d0
--- /dev/null
+++ b/test/test6.py
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+
+# Test printing
+
+import os
+os.environ['LANG']='C'
+srcdir = os.environ['srcdir']
+homedir = os.environ["HOME"] + "/";
+
+from dogtail.procedural import *
+
+if os.path.exists(homedir + "output.ps"):
+ os.unlink(homedir + "output.ps")
+
+run('evince', arguments=' '+srcdir+'/test-page-labels.pdf')
+
+click('File', roleName='menu')
+click('Print...', roleName='menu item')
+
+focus.dialog('Print')
+click('Print to File', roleName='table cell', raw=True)
+click('Print', roleName='push button')
+
+statinfo = os.stat (homedir + "output.ps")
+if statinfo.st_size > 100000:
+ exit(1)
+os.unlink (homedir + "output.ps")
+
+# Close evince
+click('File', roleName='menu')
+click('Close', roleName='menu item')