Skip to content

Commit c2c5f98

Browse files
committed
Added format to device_time as argument
1 parent 4874112 commit c2c5f98

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

appium/webdriver/webdriver.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,10 @@ def update_settings(self, settings):
521521
self.execute(Command.UPDATE_SETTINGS, data)
522522
return self
523523

524-
@property
525-
def device_time(self):
524+
def device_time(self, format=""):
526525
"""Returns the date and time from the device
527526
"""
528-
return self.execute(Command.GET_DEVICE_TIME, {})['value']
527+
return self.execute(Command.GET_DEVICE_TIME, {'format': format})['value']
529528

530529
@property
531530
def battery_info(self):
@@ -585,6 +584,6 @@ def _addCommands(self):
585584
self.command_executor._commands[Command.LOCATION_IN_VIEW] = \
586585
('GET', '/session/$sessionId/element/$id/location_in_view')
587586
self.command_executor._commands[Command.GET_DEVICE_TIME] = \
588-
('GET', '/session/$sessionId/appium/device/system_time')
587+
('POST', '/session/$sessionId/appium/device/system_time')
589588
self.command_executor._commands[Command.CLEAR] = \
590589
('POST', '/session/$sessionId/element/$id/clear')

0 commit comments

Comments
 (0)