summaryrefslogtreecommitdiff
path: root/test/testEncryptedFile.py
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2025-05-14 23:58:39 +0200
committerVictor Kareh <[email protected]>2026-02-13 09:29:25 -0500
commit481968b14fb7082a5233a47173c462f179811cde (patch)
treed6d0d98bec89393d34553696c92f3864db43a907 /test/testEncryptedFile.py
parent56853727df29fe2918ebec89eae5b38cda98c5d0 (diff)
downloadatril-481968b14fb7082a5233a47173c462f179811cde.tar.bz2
atril-481968b14fb7082a5233a47173c462f179811cde.tar.xz
Fix tests with AT-SPI2 >= 2.53
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')