From b6a19c50b04b7800f54a3bfef7271fedb1a9d50c Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Wed, 14 May 2025 23:58:39 +0200 Subject: 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. --- test/test6.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'test/test6.py') diff --git a/test/test6.py b/test/test6.py index a2687d08..30367fe2 100755 --- a/test/test6.py +++ b/test/test6.py @@ -3,15 +3,11 @@ # Test printing import os -import dogtail.config -dogtail.config.config.logDebugToStdOut = True -dogtail.config.config.logDebugToFile = False +from testCommon import pushButton +from dogtail.procedural import * -os.environ['LANG']='C' srcdir = os.environ['srcdir'] -from dogtail.procedural import * - recent_used = os.path.expanduser('~/.local/share/recently-used.xbel') recent_used_orig = recent_used + '.orig' @@ -31,7 +27,7 @@ click('Print…', roleName='menu item') click('Print to File', roleName='table cell', raw=True) click('Postscript', roleName='radio button', raw=True) -click('Print', roleName='push button') +click('Print', roleName=pushButton) statinfo = os.stat (ps_file) if statinfo.st_size > 100000: -- cgit v1.2.1