@@ -457,17 +457,6 @@ def push_file(self, path, base64data):
457457 self .execute (Command .PUSH_FILE , data )
458458 return self
459459
460- def complex_find (self , selector ):
461- """Performs a find for elements in the current application.
462-
463- :Args:
464- - selector - an array of selection criteria
465- """
466- data = {
467- 'selector' : selector ,
468- }
469- return self .execute (Command .COMPLEX_FIND , data )['value' ]
470-
471460 def background_app (self , seconds ):
472461 """Puts the application in the background on the device for a certain
473462 duration.
@@ -664,6 +653,24 @@ def active_ime_engine(self):
664653 """
665654 return self .execute (Command .GET_ACTIVE_IME_ENGINE , {})['value' ]
666655
656+ def get_settings (self ):
657+ """Returns the appium server Settings for the current session.
658+ Do not get Settings confused with Desired Capabilities, they are
659+ separate concepts. See https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/settings.md
660+ """
661+ return self .execute (Command .GET_SETTINGS , {})['value' ]
662+
663+ def update_settings (self , settings ):
664+ """Set settings for the current session.
665+ For more on settings, see: https://github.com/appium/appium/blob/master/docs/en/advanced-concepts/settings.md
666+
667+ :Args:
668+ - settings - dictionary of settings to apply to the current test session
669+ """
670+ data = {"settings" : settings }
671+
672+ self .execute (Command .UPDATE_SETTINGS , data )
673+ return self
667674
668675 def _addCommands (self ):
669676 self .command_executor ._commands [Command .CONTEXTS ] = \
@@ -695,8 +702,6 @@ def _addCommands(self):
695702 ('POST' , '/session/$sessionId/appium/device/pull_folder' )
696703 self .command_executor ._commands [Command .PUSH_FILE ] = \
697704 ('POST' , '/session/$sessionId/appium/device/push_file' )
698- self .command_executor ._commands [Command .COMPLEX_FIND ] = \
699- ('POST' , '/session/$sessionId/appium/app/complex_find' )
700705 self .command_executor ._commands [Command .BACKGROUND ] = \
701706 ('POST' , '/session/$sessionId/appium/app/background' )
702707 self .command_executor ._commands [Command .IS_APP_INSTALLED ] = \
@@ -739,6 +744,10 @@ def _addCommands(self):
739744 ('GET' , '/session/$sessionId/ime/active_engine' )
740745 self .command_executor ._commands [Command .REPLACE_KEYS ] = \
741746 ('POST' , '/session/$sessionId/appium/element/$elementId/replace_value' )
747+ self .command_executor ._commands [Command .GET_SETTINGS ] = \
748+ ('GET' , '/session/$sessionId/appium/settings' )
749+ self .command_executor ._commands [Command .UPDATE_SETTINGS ] = \
750+ ('POST' , '/session/$sessionId/appium/settings' )
742751
743752
744753# monkeypatched method for WebElement
0 commit comments