@@ -248,25 +248,27 @@ def app_strings(self, language: Union[str, None] = None, string_file: Union[str,
248248 return self .mark_extension_absence (ext_name ).execute (Command .GET_APP_STRINGS , data )['value' ]
249249
250250 def _add_commands (self ) -> None :
251- # noinspection PyProtectedMember,PyUnresolvedReferences
252- commands = self .command_executor ._commands
253- commands [Command .BACKGROUND ] = ('POST' , '/session/$sessionId/appium/app/background' )
254- commands [Command .IS_APP_INSTALLED ] = (
251+ self .command_executor .add_command (Command .BACKGROUND , 'POST' , '/session/$sessionId/appium/app/background' )
252+ self .command_executor .add_command (
253+ Command .IS_APP_INSTALLED ,
255254 'POST' ,
256255 '/session/$sessionId/appium/device/app_installed' ,
257256 )
258- commands [Command .INSTALL_APP ] = ('POST' , '/session/$sessionId/appium/device/install_app' )
259- commands [Command .REMOVE_APP ] = ('POST' , '/session/$sessionId/appium/device/remove_app' )
260- commands [Command .TERMINATE_APP ] = (
257+ self .command_executor .add_command (Command .INSTALL_APP , 'POST' , '/session/$sessionId/appium/device/install_app' )
258+ self .command_executor .add_command (Command .REMOVE_APP , 'POST' , '/session/$sessionId/appium/device/remove_app' )
259+ self .command_executor .add_command (
260+ Command .TERMINATE_APP ,
261261 'POST' ,
262262 '/session/$sessionId/appium/device/terminate_app' ,
263263 )
264- commands [Command .ACTIVATE_APP ] = (
264+ self .command_executor .add_command (
265+ Command .ACTIVATE_APP ,
265266 'POST' ,
266267 '/session/$sessionId/appium/device/activate_app' ,
267268 )
268- commands [Command .QUERY_APP_STATE ] = (
269+ self .command_executor .add_command (
270+ Command .QUERY_APP_STATE ,
269271 'POST' ,
270272 '/session/$sessionId/appium/device/app_state' ,
271273 )
272- commands [ Command .GET_APP_STRINGS ] = ( 'POST' , '/session/$sessionId/appium/app/strings' )
274+ self . command_executor . add_command ( Command .GET_APP_STRINGS , 'POST' , '/session/$sessionId/appium/app/strings' )
0 commit comments