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
8 changes: 8 additions & 0 deletions appium/webdriver/extensions/applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ def app_strings(self, language=None, string_file=None):
data['stringFile'] = string_file
return self.execute(Command.GET_APP_STRINGS, data)['value']

def reset(self):
"""Resets the current application on the device.
"""
self.execute(Command.RESET)
return self

# pylint: disable=protected-access

def _addCommands(self):
Expand All @@ -202,3 +208,5 @@ def _addCommands(self):
('POST', '/session/$sessionId/appium/device/app_state')
self.command_executor._commands[Command.GET_APP_STRINGS] = \
('POST', '/session/$sessionId/appium/app/strings')
self.command_executor._commands[Command.RESET] = \
('POST', '/session/$sessionId/appium/app/reset')
8 changes: 0 additions & 8 deletions appium/webdriver/webdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,6 @@ def create_web_element(self, element_id):
"""
return MobileWebElement(self, element_id)

def reset(self):
"""Resets the current application on the device.
"""
self.execute(Command.RESET)
return self

def press_button(self, button_name):
"""Sends a physical button name to the device to simulate the user pressing.

Expand Down Expand Up @@ -678,8 +672,6 @@ def _addCommands(self):
('POST', '/session/$sessionId/appium/app/close')
self.command_executor._commands[Command.END_TEST_COVERAGE] = \
('POST', '/session/$sessionId/appium/app/end_test_coverage')
self.command_executor._commands[Command.RESET] = \
('POST', '/session/$sessionId/appium/app/reset')
self.command_executor._commands[Command.OPEN_NOTIFICATIONS] = \
('POST', '/session/$sessionId/appium/device/open_notifications')
self.command_executor._commands[Command.REPLACE_KEYS] = \
Expand Down