summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-06-26 10:15:07 +0800
committerraveit65 <[email protected]>2019-07-01 16:22:46 +0200
commitdc0b8781552c221ac9910faf70224f2ac506775d (patch)
tree447e06dbb0518d7355e0708a01a2e6297adf39a3
parentcb4293fe6cb01c7ffcb890a22e91ed0702d2656f (diff)
downloadatril-dc0b8781552c221ac9910faf70224f2ac506775d.tar.bz2
atril-dc0b8781552c221ac9910faf70224f2ac506775d.tar.xz
force get focus on atril when testing
-rwxr-xr-xtest/test2.py1
-rwxr-xr-xtest/test3.py1
-rwxr-xr-xtest/test5.py2
-rwxr-xr-xtest/test6.py1
4 files changed, 5 insertions, 0 deletions
diff --git a/test/test2.py b/test/test2.py
index f4263e52..7e3a8e30 100755
--- a/test/test2.py
+++ b/test/test2.py
@@ -11,6 +11,7 @@ from dogtail.procedural import *
run('atril', arguments=' '+srcdir+'/test-encrypt.pdf')
# Try an incorrect password first
+focus.application('atril')
type('wrong password')
click('Unlock Document', roleName='push button')
focus.dialog('Enter password')
diff --git a/test/test3.py b/test/test3.py
index f73feec7..4b731819 100755
--- a/test/test3.py
+++ b/test/test3.py
@@ -11,5 +11,6 @@ from dogtail.procedural import *
run('atril', arguments=' '+srcdir+'/test-mime.bin')
# Close atril
+focus.application('atril')
click('File', roleName='menu')
click('Close', roleName='menu item')
diff --git a/test/test5.py b/test/test5.py
index 87729995..48218881 100755
--- a/test/test5.py
+++ b/test/test5.py
@@ -10,11 +10,13 @@ from dogtail.procedural import *
run('atril', arguments=' '+srcdir+'/test-page-labels.pdf')
+focus.application('atril')
focus.widget('page-label-entry')
focus.widget.text = "iii"
activate()
if focus.widget.text != "III":
+ focus.application('atril')
click('File', roleName='menu')
click('Close', roleName='menu item')
exit (1)
diff --git a/test/test6.py b/test/test6.py
index 60c7bc4e..a2687d08 100755
--- a/test/test6.py
+++ b/test/test6.py
@@ -25,6 +25,7 @@ if os.path.exists(ps_file):
run('atril', arguments=' '+srcdir+'/test-page-labels.pdf')
+focus.application('atril')
click('File', roleName='menu')
click('Print…', roleName='menu item')