summaryrefslogtreecommitdiff
path: root/test/testFileMenu.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/testFileMenu.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/testFileMenu.py')
-rwxr-xr-xtest/testFileMenu.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/testFileMenu.py b/test/testFileMenu.py
index 5c1c5a9a..81723c8d 100755
--- a/test/testFileMenu.py
+++ b/test/testFileMenu.py
@@ -2,7 +2,7 @@
# Test that the File menu and menu items work correctly.
-from testCommon import run_app, bail
+from testCommon import run_app, bail, pushButton
from dogtail.procedural import *
@@ -12,20 +12,20 @@ try:
# Open a file
click('File', roleName='menu')
click('Open…', roleName='menu item')
- click('Cancel', roleName='push button')
+ click('Cancel', roleName=pushButton)
# Save As
focus.frame('test-links.pdf')
click('File', roleName='menu')
click('Save As…', roleName='menu item')
- click('Cancel', roleName='push button')
+ click('Cancel', roleName=pushButton)
# Print
focus.frame('test-links.pdf')
click('File', roleName='menu')
click('Print…', roleName='menu item')
focus.dialog('Print')
- click('Cancel', roleName='push button')
+ click('Cancel', roleName=pushButton)
# Properties
focus.frame('test-links.pdf')
@@ -34,7 +34,7 @@ try:
click('Fonts', roleName='page tab')
click('General', roleName='page tab')
focus.dialog('Properties')
- click('Close', roleName='push button')
+ click('Close', roleName=pushButton)
# Close
focus.frame('test-links.pdf')