]> www.fi.muni.cz Git - evince.git/blob - test/test2.py
Cleaned up the dogtail scripts.
[evince.git] / test / test2.py
1 #!/usr/bin/python
2
3 # This test opens a password encrypted file and tries to unlock it.
4
5 from dogtail.procedural import *
6
7 run('evince', arguments=' ./test-encrypt.pdf',)
8
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')
15
16 # Try again with the correct password
17 click('Unlock Document', roleName='push button')
18 focus.widget('Password Entry', roleName='password text')
19 type('Foo')
20 click('OK', roleName='push button')
21
22 # Close evince
23 click('File', roleName='menu')
24 click('Close', roleName='menu item')