3 # This test opens a password encrypted file and tries to unlock it.
6 os.environ['LANG']='en_US.UTF-8'
8 from dogtail.procedural import *
10 run('evince', arguments=' ./test-encrypt.pdf',)
12 # Try an incorrect password first
13 focus.dialog('Enter password')
14 focus.widget('Password Entry', roleName='password text')
15 type('wrong password')
16 click('OK', roleName='push button')
17 click('Cancel', roleName='push button')
19 # Try again with the correct password
20 click('Unlock Document', roleName='push button')
21 focus.widget('Password Entry', roleName='password text')
23 click('OK', roleName='push button')
26 click('File', roleName='menu')
27 click('Close', roleName='menu item')