Fix the get terminal output error caused by namespace parameter changes
This commit is contained in:
@@ -206,7 +206,7 @@ def get_terminal_output():
|
||||
# 1. the terminal window (frame of application is st:active) is open and active
|
||||
# 2. the terminal tab (terminal status is st:focused) is focused
|
||||
xpath = '//application[@name="gnome-terminal-server"]/frame[@st:active="true"]//terminal[@st:focused="true"]'
|
||||
terminals: List[_Element] = desktop_xml.xpath(xpath, namespaces=_accessibility_ns_map)
|
||||
terminals: List[_Element] = desktop_xml.xpath(xpath, namespaces=_accessibility_ns_map_ubuntu)
|
||||
output = terminals[0].text.rstrip() if len(terminals) == 1 else None
|
||||
else: # windows and macos platform is not implemented currently
|
||||
# raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user