Skip to content

Commit e33851f

Browse files
authored
feat!: drop CanRememberExtensionPresence (#1269)
* feat: drop CanRememberExtensionPresence * remove self and UnknownMethodException
1 parent ad193d1 commit e33851f

3 files changed

Lines changed: 1 addition & 61 deletions

File tree

appium/protocols/webdriver/can_remember_extension_presence.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

appium/webdriver/extensions/android/common.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616

1717
from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
1818
from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts
19-
from appium.protocols.webdriver.can_remember_extension_presence import CanRememberExtensionPresence
2019

2120

22-
class Common(CanExecuteCommands, CanExecuteScripts, CanRememberExtensionPresence):
21+
class Common(CanExecuteCommands, CanExecuteScripts):
2322
def open_notifications(self) -> Self:
2423
"""Open notification shade in Android (API Level 18 and above)
2524

appium/webdriver/webdriver.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@
1717
from selenium.common.exceptions import (
1818
InvalidArgumentException,
1919
SessionNotCreatedException,
20-
UnknownMethodException,
2120
WebDriverException,
2221
)
2322
from selenium.webdriver.remote.command import Command as RemoteCommand
2423
from selenium.webdriver.remote.remote_connection import RemoteConnection
2524

2625
# `selenium.webdriver.Remote` could be used instead, but Pyright wouldn't locate the class properly.
2726
from selenium.webdriver.remote.webdriver import WebDriver as Remote
28-
from typing_extensions import Self
2927

3028
from appium.common.logger import logger
3129
from appium.options.common.base import AppiumOptions
@@ -436,40 +434,6 @@ def orientation(self, value: str) -> None:
436434
else:
437435
raise WebDriverException("You can only set the orientation to 'LANDSCAPE' and 'PORTRAIT'")
438436

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-
473437
def _add_commands(self) -> None:
474438
# call the overridden command binders from all mixin classes except for
475439
# appium.webdriver.webdriver.WebDriver and its sub-classes

0 commit comments

Comments
 (0)