Sitelet https://github.com/appium/python-client/pull/738/files
Skip to content
Merged
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
6 changes: 4 additions & 2 deletions appium/webdriver/common/multi_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
# chaining as the spec requires.

import copy
import warnings
from typing import TYPE_CHECKING, Dict, List, Optional, Union

from appium.common.logger import logger
from appium.webdriver.mobilecommand import MobileCommand as Command

if TYPE_CHECKING:
Expand All @@ -37,7 +37,9 @@ class MultiAction:
"""

def __init__(self, driver: 'WebDriver', element: Optional['WebElement'] = None) -> None:
logger.warning("[Deprecated] 'MultiAction' action is deprecated. Please use W3C actions instead.")
warnings.warn(
"[Deprecated] 'MultiAction' action is deprecated. Please use W3C actions instead.", DeprecationWarning
)

self._driver = driver
self._element = element
Expand Down
6 changes: 4 additions & 2 deletions appium/webdriver/common/touch_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
# pylint: disable=no-self-use

import copy
import warnings
from typing import TYPE_CHECKING, Dict, List, Optional, Union

from appium.common.logger import logger
from appium.webdriver.mobilecommand import MobileCommand as Command

if TYPE_CHECKING:
Expand All @@ -41,7 +41,9 @@ class TouchAction:
"""

def __init__(self, driver: Optional['WebDriver'] = None):
logger.warning("[Deprecated] 'TouchAction' action is deprecated. Please use W3C actions instead.")
warnings.warn(
"[Deprecated] 'TouchAction' action is deprecated. Please use W3C actions instead.", DeprecationWarning
)

self._driver = driver
self._actions: List = []
Expand Down
23 changes: 22 additions & 1 deletion appium/webdriver/extensions/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import warnings
from typing import TYPE_CHECKING, Any, Dict

from appium.protocols.webdriver.can_execute_commands import CanExecuteCommands
Expand Down Expand Up @@ -106,20 +106,34 @@ def remove_app(self, app_id: str, **options: Any) -> 'WebDriver':

def launch_app(self) -> 'WebDriver':
"""Start on the device the application specified in the desired capabilities.
deprecated:: 2.0.0

Returns:
Union['WebDriver', 'Applications']: Self instance
"""
warnings.warn(
'The "launchApp" API is deprecated and will be removed in future versions. '
'See https://github.com/appium/appium/issues/15807',
DeprecationWarning,
)

self.execute(Command.LAUNCH_APP)
return self # type: ignore

def close_app(self) -> 'WebDriver':
"""Stop the running application, specified in the desired capabilities, on
the device.
deprecated:: 2.0.0

Returns:
Union['WebDriver', 'Applications']: Self instance
"""
warnings.warn(
'The "closeApp" API is deprecated and will be removed in future versions. '
'See https://github.com/appium/appium/issues/15807',
DeprecationWarning,
)

self.execute(Command.CLOSE_APP)
return self # type: ignore

Expand Down Expand Up @@ -194,10 +208,17 @@ def app_strings(self, language: str = None, string_file: str = None) -> Dict[str

def reset(self) -> 'WebDriver':
"""Resets the current application on the device.
deprecated:: 2.0.0

Returns:
Union['WebDriver', 'Applications']: Self instance
"""
warnings.warn(
'The "reset" API is deprecated and will be removed in future versions. '
'See https://github.com/appium/appium/issues/15807',
DeprecationWarning,
)

self.execute(Command.RESET)
return self # type: ignore

Expand Down
39 changes: 0 additions & 39 deletions appium/webdriver/extensions/search_context/__init__.py

This file was deleted.

237 changes: 0 additions & 237 deletions appium/webdriver/extensions/search_context/android.py

This file was deleted.

Loading