Skip to content

Commit 34dd9cc

Browse files
committed
use instance method
1 parent 0564815 commit 34dd9cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

appium/webdriver/extensions/context.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ def context(self) -> str:
5858
return self.current_context
5959

6060
def _add_commands(self) -> None:
61-
self.command_executor.extra_commands[Command.CONTEXTS] = ('GET', '/session/$sessionId/contexts')
62-
self.command_executor.extra_commands[Command.GET_CURRENT_CONTEXT] = ('GET', '/session/$sessionId/context')
63-
self.command_executor.extra_commands[Command.SWITCH_TO_CONTEXT] = ('POST', '/session/$sessionId/context')
61+
self.command_executor.add_command(Command.CONTEXTS, 'GET', '/session/$sessionId/contexts')
62+
self.command_executor.add_command(Command.GET_CURRENT_CONTEXT, 'GET', '/session/$sessionId/context')
63+
self.command_executor.add_command(Command.SWITCH_TO_CONTEXT, 'POST', '/session/$sessionId/context')

0 commit comments

Comments
 (0)