File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,9 @@ class A11yMethod(enum.Enum):
133133 # From `uiautomator dump``.
134134 UIAUTOMATOR = 'uiautomator'
135135
136+ # No A11y tree retrieval
137+ NONE = 'none'
138+
136139
137140def apply_a11y_forwarder_app_wrapper (
138141 env : env_interface .AndroidEnvInterface , install_a11y_forwarding_app : bool
@@ -228,10 +231,12 @@ def get_ui_elements(self) -> list[representation_utils.UIElement]:
228231 self .get_a11y_forest (),
229232 exclude_invisible_elements = True ,
230233 )
231- else :
234+ elif self . _a11y_method == A11yMethod . UIAUTOMATOR :
232235 return representation_utils .xml_dump_to_ui_elements (
233236 adb_utils .uiautomator_dump (self ._env )
234237 )
238+ else :
239+ return []
235240
236241 def _process_timestep (self , timestep : dm_env .TimeStep ) -> dm_env .TimeStep :
237242 """Adds a11y tree info to the observation."""
You can’t perform that action at this time.
0 commit comments