summaryrefslogtreecommitdiff
path: root/test/testEncryptedFile.py
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2025-05-14 23:58:39 +0200
committerColomban Wendling <[email protected]>2025-05-14 23:58:39 +0200
commitb6a19c50b04b7800f54a3bfef7271fedb1a9d50c (patch)
tree439bb1af539c865849f790c36510342cc6a20839 /test/testEncryptedFile.py
parent239ebd2f3ce65f394bb94089a57aae8e40f953aa (diff)
downloadatril-b6a19c50b04b7800f54a3bfef7271fedb1a9d50c.tar.bz2
atril-b6a19c50b04b7800f54a3bfef7271fedb1a9d50c.tar.xz
Fix tests with AT-SPI2 >= 2.53failing-tests
Role name for push buttons changed from "push button" to "button" for uniformizing APIs, but that means the names Dogtail use have to match, as it's not using the role IDs but names. Fix this by trying to ask AT-SPI2 for the name, and falling back on the historical name in the odd case it'd fail.
Diffstat (limited to 'test/testEncryptedFile.py')
-rwxr-xr-xtest/testEncryptedFile.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/testEncryptedFile.py b/test/testEncryptedFile.py
index 83c48a60..808efac4 100755
--- a/test/testEncryptedFile.py
+++ b/test/testEncryptedFile.py
@@ -2,7 +2,7 @@
# Test opening a password encrypted file and unlocking it.
-from testCommon import run_app, bail
+from testCommon import run_app, bail, pushButton
from dogtail.procedural import *
@@ -13,16 +13,16 @@ try:
# Try an incorrect password first
focus.dialog('Enter password')
type('wrong password')
- click('Unlock Document', roleName='push button')
+ click('Unlock Document', roleName=pushButton)
focus.dialog('Enter password')
- click('Cancel', roleName='push button')
+ click('Cancel', roleName=pushButton)
# Try again with the correct password
focus.frame('test-encrypt.pdf — Password Required')
- click('Unlock Document', roleName='push button')
+ click('Unlock Document', roleName=pushButton)
type('Foo')
focus.dialog('Enter password')
- click('Unlock Document', roleName='push button')
+ click('Unlock Document', roleName=pushButton)
# Close Atril
focus.frame('test-encrypt.pdf — Dokument1')