summaryrefslogtreecommitdiff
path: root/test/test1.py
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-23 22:20:50 +0800
committerraveit65 <[email protected]>2019-07-01 16:22:46 +0200
commitcb4293fe6cb01c7ffcb890a22e91ed0702d2656f (patch)
tree9b1482e969046b3d82b6d074a334d530ae32e6e6 /test/test1.py
parent449f6af7514251c7dda6fdf4ad2d1c6e37d42835 (diff)
downloadatril-cb4293fe6cb01c7ffcb890a22e91ed0702d2656f.tar.bz2
atril-cb4293fe6cb01c7ffcb890a22e91ed0702d2656f.tar.xz
migrate to python3 for test cases
Diffstat (limited to 'test/test1.py')
-rwxr-xr-xtest/test1.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/test/test1.py b/test/test1.py
index 7bd0698e..97db085c 100755
--- a/test/test1.py
+++ b/test/test1.py
@@ -1,36 +1,38 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# This test opens the interface and just clicks around a bit.
import os
-os.environ['LANG']='C'
+import dogtail.config
+dogtail.config.config.logDebugToStdOut = True
+dogtail.config.config.logDebugToFile = False
from dogtail.procedural import *
+os.environ['LANG']='C'
run('atril')
# Test file->open
+focus.application('atril')
click('File', roleName='menu')
-click('Open...', roleName='menu item')
-focus.dialog('Open Document')
+click('Open…', roleName='menu item')
click('Cancel', roleName='push button')
# Toolbar editor
+focus.application('atril')
click('Edit', roleName='menu')
click('Toolbar', roleName='menu item')
-focus.dialog('Toolbar Editor')
click('Close', roleName='push button')
# About dialog
+focus.application('atril')
click('Help', roleName='menu')
click('About', roleName='menu item')
-focus.dialog('About Document Viewer')
-click('Credits', roleName='push button')
-focus.dialog('Credits')
-click('Close', roleName='push button')
-focus.dialog('About Document Viewer')
+click('Credits', roleName='toggle button')
+click('Credits', roleName='toggle button')
click('Close', roleName='push button')
# Close atril
-click('File', roleName='menu')
+focus.application('atril')
+click.menu('File')
click('Close', roleName='menu item')