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