MCPcopy
hub / github.com/appium/python-client / shake

Method shake

appium/webdriver/extensions/hw_actions.py:78–90  ·  view source on GitHub ↗

Shake the device. Returns: Union['WebDriver', 'HardwareActions']: Self instance

(self)

Source from the content-addressed store, hash-verified

76 return self.mark_extension_absence(ext_name).execute(Command.IS_LOCKED)['value']
77
78 def shake(self) -> Self:
79 """Shake the device.
80
81 Returns:
82 Union['WebDriver', 'HardwareActions']: Self instance
83 """
84 ext_name = 'mobile: shake'
85 try:
86 self.assert_extension_exists(ext_name).execute_script(ext_name)
87 except UnknownMethodException:
88 # TODO: Remove the fallback
89 self.mark_extension_absence(ext_name).execute(Command.SHAKE)
90 return self
91
92 def touch_id(self, match: bool) -> Self:
93 """Simulate touchId on iOS Simulator

Callers 1

test_shakeMethod · 0.80

Calls 4

execute_scriptMethod · 0.80
executeMethod · 0.45

Tested by 1

test_shakeMethod · 0.64