|
17 | 17 | from selenium.common.exceptions import ( |
18 | 18 | InvalidArgumentException, |
19 | 19 | SessionNotCreatedException, |
20 | | - UnknownMethodException, |
21 | 20 | WebDriverException, |
22 | 21 | ) |
23 | 22 | from selenium.webdriver.remote.command import Command as RemoteCommand |
24 | 23 | from selenium.webdriver.remote.remote_connection import RemoteConnection |
25 | 24 |
|
26 | 25 | # `selenium.webdriver.Remote` could be used instead, but Pyright wouldn't locate the class properly. |
27 | 26 | from selenium.webdriver.remote.webdriver import WebDriver as Remote |
28 | | -from typing_extensions import Self |
29 | 27 |
|
30 | 28 | from appium.common.logger import logger |
31 | 29 | from appium.options.common.base import AppiumOptions |
@@ -436,40 +434,6 @@ def orientation(self, value: str) -> None: |
436 | 434 | else: |
437 | 435 | raise WebDriverException("You can only set the orientation to 'LANDSCAPE' and 'PORTRAIT'") |
438 | 436 |
|
439 | | - def assert_extension_exists(self, ext_name: str) -> Self: |
440 | | - """ |
441 | | - Verifies if the given extension is not present in the list of absent extensions |
442 | | - for the given driver instance. |
443 | | - This API is designed for private usage. |
444 | | -
|
445 | | - Args: |
446 | | - ext_name: extension name |
447 | | -
|
448 | | - Returns: |
449 | | - self instance for chaining |
450 | | -
|
451 | | - Raises: |
452 | | - UnknownMethodException: If the extension has been marked as absent once |
453 | | - """ |
454 | | - if ext_name in self._absent_extensions: |
455 | | - raise UnknownMethodException() |
456 | | - return self |
457 | | - |
458 | | - def mark_extension_absence(self, ext_name: str) -> Self: |
459 | | - """ |
460 | | - Marks the given extension as absent for the given driver instance. |
461 | | - This API is designed for private usage. |
462 | | -
|
463 | | - Args: |
464 | | - ext_name: extension name |
465 | | -
|
466 | | - Returns: |
467 | | - self instance for chaining |
468 | | - """ |
469 | | - logger.debug(f'Marking driver extension "{ext_name}" as absent for the current instance') |
470 | | - self._absent_extensions.add(ext_name) |
471 | | - return self |
472 | | - |
473 | 437 | def _add_commands(self) -> None: |
474 | 438 | # call the overridden command binders from all mixin classes except for |
475 | 439 | # appium.webdriver.webdriver.WebDriver and its sub-classes |
|
0 commit comments