From 944f312b240b4b19f7b5fe0f73d814366402817d Mon Sep 17 00:00:00 2001 From: Mahmudul Alam Date: Wed, 1 Jul 2026 19:55:25 +0600 Subject: [PATCH] Fix pyatspi getStateSet compatibility across library versions Some pyatspi versions expose get_state_set() instead of getStateSet(), causing AttributeError in get_extended_info on Linux desktop automation. Co-Authored-By: Claude Sonnet 5 --- .../Built_In_Automation/Desktop/Linux/BuiltInFunctions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Framework/Built_In_Automation/Desktop/Linux/BuiltInFunctions.py b/Framework/Built_In_Automation/Desktop/Linux/BuiltInFunctions.py index 18abba7c..2dd4ef19 100644 --- a/Framework/Built_In_Automation/Desktop/Linux/BuiltInFunctions.py +++ b/Framework/Built_In_Automation/Desktop/Linux/BuiltInFunctions.py @@ -836,7 +836,10 @@ def get_extended_info(accessible): except Exception: pass try: - state_set = accessible.getStateSet() + try: + state_set = accessible.getStateSet() + except Exception: + state_set = accessible.get_state_set() states = [pyatspi.stateToString(s) or "" for s in state_set.getStates()] if states: info_str += f' states="{",".join(states)}"'