Skip to content

Commit

Permalink
use external command
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Oct 18, 2024
1 parent 4a10690 commit 0564815
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions appium/webdriver/extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ def context(self) -> str:
return self.current_context

def _add_commands(self) -> None:
# noinspection PyProtectedMember,PyUnresolvedReferences
commands = self.command_executor._commands
commands[Command.CONTEXTS] = ('GET', '/session/$sessionId/contexts')
commands[Command.GET_CURRENT_CONTEXT] = ('GET', '/session/$sessionId/context')
commands[Command.SWITCH_TO_CONTEXT] = ('POST', '/session/$sessionId/context')
self.command_executor.extra_commands[Command.CONTEXTS] = ('GET', '/session/$sessionId/contexts')
self.command_executor.extra_commands[Command.GET_CURRENT_CONTEXT] = ('GET', '/session/$sessionId/context')
self.command_executor.extra_commands[Command.SWITCH_TO_CONTEXT] = ('POST', '/session/$sessionId/context')

0 comments on commit 0564815

Please sign in to comment.