From cb4293fe6cb01c7ffcb890a22e91ed0702d2656f Mon Sep 17 00:00:00 2001 From: Wu Xiaotian Date: Sun, 23 Jun 2019 22:20:50 +0800 Subject: migrate to python3 for test cases --- test/test2.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/test2.py') diff --git a/test/test2.py b/test/test2.py index 910a8425..f4263e52 100755 --- a/test/test2.py +++ b/test/test2.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # This test opens a password encrypted file and tries to unlock it. @@ -11,18 +11,19 @@ from dogtail.procedural import * run('atril', arguments=' '+srcdir+'/test-encrypt.pdf') # Try an incorrect password first -focus.dialog('Enter password') -focus.widget('Password Entry', roleName='password text') type('wrong password') click('Unlock Document', roleName='push button') +focus.dialog('Enter password') click('Cancel', roleName='push button') # Try again with the correct password +focus.application('atril') click('Unlock Document', roleName='push button') -focus.widget('Password Entry', roleName='password text') +focus.dialog('Enter password') type('Foo') click('Unlock Document', roleName='push button') # Close atril +focus.application('atril') click('File', roleName='menu') click('Close', roleName='menu item') -- cgit v1.2.1