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

Method is_locked

appium/webdriver/extensions/hw_actions.py:65–76  ·  view source on GitHub ↗

Checks whether the device is locked. Returns: `True` if the device is locked

(self)

Source from the content-addressed store, hash-verified

63 return self
64
65 def is_locked(self) -> bool:
66 """Checks whether the device is locked.
67
68 Returns:
69 `True` if the device is locked
70 """
71 ext_name = 'mobile: isLocked'
72 try:
73 return self.assert_extension_exists(ext_name).execute_script('mobile: isLocked')
74 except UnknownMethodException:
75 # TODO: Remove the fallback
76 return self.mark_extension_absence(ext_name).execute(Command.IS_LOCKED)['value']
77
78 def shake(self) -> Self:
79 """Shake the device.

Callers 4

test_islocked_falseMethod · 0.80
test_islocked_trueMethod · 0.80
test_islocked_falseMethod · 0.80
test_islocked_trueMethod · 0.80

Calls 4

execute_scriptMethod · 0.80
executeMethod · 0.45

Tested by 4

test_islocked_falseMethod · 0.64
test_islocked_trueMethod · 0.64
test_islocked_falseMethod · 0.64
test_islocked_trueMethod · 0.64