3 # This test opens a password encrypted file and tries to unlock it.
7 srcdir = os.environ['srcdir']
9 from dogtail.procedural import *
11 run('evince', arguments=' '+srcdir+'/test-encrypt.pdf')
13 # Try an incorrect password first
14 focus.dialog('Enter password')
15 focus.widget('Password Entry', roleName='password text')
16 type('wrong password')
17 click('OK', roleName='push button')
18 click('Cancel', roleName='push button')
20 # Try again with the correct password
21 click('Unlock Document', roleName='push button')
22 focus.widget('Password Entry', roleName='password text')
24 click('OK', roleName='push button')
27 click('File', roleName='menu')
28 click('Close', roleName='menu item')