From a230f5a9a41421dc034445006ad4be59d896ea15 Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 13 Dec 2022 15:15:56 -0800 Subject: [PATCH 1/2] remove clear --- appium/webdriver/webelement.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/appium/webdriver/webelement.py b/appium/webdriver/webelement.py index 128ceb0c..9af5b481 100644 --- a/appium/webdriver/webelement.py +++ b/appium/webdriver/webelement.py @@ -143,18 +143,6 @@ def find_elements(self, by: str = AppiumBy.ID, value: Union[str, Dict, None] = N return self._execute(RemoteCommand.FIND_CHILD_ELEMENTS, {"using": by, "value": value})['value'] - def clear(self) -> 'WebElement': - """Clears text. - - Override for Appium - - Returns: - `appium.webdriver.webelement.WebElement` - """ - data = {'id': self.id} - self._execute(Command.CLEAR, data) - return self - def set_text(self, keys: str = '') -> 'WebElement': """Sends text to the element. From 4f6ed63129d176b363f5d838cacf2ca2fa9a3acc Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Tue, 13 Dec 2022 15:18:28 -0800 Subject: [PATCH 2/2] remove clear more --- appium/webdriver/mobilecommand.py | 1 - appium/webdriver/webdriver.py | 1 - 2 files changed, 2 deletions(-) diff --git a/appium/webdriver/mobilecommand.py b/appium/webdriver/mobilecommand.py index 334f4710..25664c25 100644 --- a/appium/webdriver/mobilecommand.py +++ b/appium/webdriver/mobilecommand.py @@ -29,7 +29,6 @@ class MobileCommand: DEACTIVATE_IME_ENGINE = 'deactivateIMEEngine' GET_ACTIVE_IME_ENGINE = 'getActiveEngine' - CLEAR = 'clear' LOCATION_IN_VIEW = 'locationInView' CONTEXTS = 'getContexts' diff --git a/appium/webdriver/webdriver.py b/appium/webdriver/webdriver.py index 00f0eaf9..f5073120 100644 --- a/appium/webdriver/webdriver.py +++ b/appium/webdriver/webdriver.py @@ -505,7 +505,6 @@ def _add_commands(self) -> None: 'POST', '/session/$sessionId/appium/element/$id/replace_value', ) - commands[Command.CLEAR] = ('POST', '/session/$sessionId/element/$id/clear') commands[Command.LOCATION_IN_VIEW] = ( 'GET', '/session/$sessionId/element/$id/location_in_view',