Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions appium/protocols/webdriver/can_remember_extension_presence.py

This file was deleted.

3 changes: 1 addition & 2 deletions appium/webdriver/extensions/android/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
from appium.protocols.webdriver.can_execute_scripts import CanExecuteScripts
from appium.protocols.webdriver.can_remember_extension_presence import CanRememberExtensionPresence


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

Expand Down
36 changes: 0 additions & 36 deletions appium/webdriver/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
from selenium.common.exceptions import (
InvalidArgumentException,
SessionNotCreatedException,
UnknownMethodException,
WebDriverException,
)
from selenium.webdriver.remote.command import Command as RemoteCommand
from selenium.webdriver.remote.remote_connection import RemoteConnection

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

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

def assert_extension_exists(self, ext_name: str) -> Self:
"""
Verifies if the given extension is not present in the list of absent extensions
for the given driver instance.
This API is designed for private usage.

Args:
ext_name: extension name

Returns:
self instance for chaining

Raises:
UnknownMethodException: If the extension has been marked as absent once
"""
if ext_name in self._absent_extensions:
raise UnknownMethodException()
return self

def mark_extension_absence(self, ext_name: str) -> Self:
"""
Marks the given extension as absent for the given driver instance.
This API is designed for private usage.

Args:
ext_name: extension name

Returns:
self instance for chaining
"""
logger.debug(f'Marking driver extension "{ext_name}" as absent for the current instance')
self._absent_extensions.add(ext_name)
return self

def _add_commands(self) -> None:
# call the overridden command binders from all mixin classes except for
# appium.webdriver.webdriver.WebDriver and its sub-classes
Expand Down
Loading