(self)
| 471 | return self |
| 472 | |
| 473 | def _add_commands(self) -> None: |
| 474 | # call the overridden command binders from all mixin classes except for |
| 475 | # appium.webdriver.webdriver.WebDriver and its sub-classes |
| 476 | # https://github.com/appium/python-client/issues/342 |
| 477 | for mixin_class in filter(lambda x: not issubclass(x, WebDriver), self.__class__.__mro__): |
| 478 | if hasattr(mixin_class, self._add_commands.__name__): |
| 479 | get_atter = getattr(mixin_class, self._add_commands.__name__, None) |
| 480 | if get_atter: |
| 481 | get_atter(self) |
| 482 | |
| 483 | self.command_executor.add_command(Command.GET_STATUS, 'GET', '/status') |
| 484 | |
| 485 | # TODO Move commands for element to webelement |
| 486 | self.command_executor.add_command(Command.CLEAR, 'POST', '/session/$sessionId/element/$id/clear') |
| 487 | self.command_executor.add_command( |
| 488 | Command.LOCATION_IN_VIEW, |
| 489 | 'GET', |
| 490 | '/session/$sessionId/element/$id/location_in_view', |
| 491 | ) |
| 492 | |
| 493 | # MJSONWP for Selenium v4 |
| 494 | self.command_executor.add_command(Command.IS_ELEMENT_DISPLAYED, 'GET', '/session/$sessionId/element/$id/displayed') |
| 495 | self.command_executor.add_command(Command.GET_CAPABILITIES, 'GET', '/session/$sessionId') |
| 496 | |
| 497 | self.command_executor.add_command(Command.GET_SCREEN_ORIENTATION, 'GET', '/session/$sessionId/orientation') |
| 498 | self.command_executor.add_command(Command.SET_SCREEN_ORIENTATION, 'POST', '/session/$sessionId/orientation') |
no test coverage detected