Sends a keycode to the device. Android only. Possible keycodes can be found in http://developer.android.com/reference/android/view/KeyEvent.html. Args: keycode: the keycode to be sent to the device metastate: meta information about the keycode being
(self, keycode: int, metastate: Optional[int] = None)
| 70 | return self.mark_extension_absence(ext_name).execute(Command.IS_KEYBOARD_SHOWN)['value'] |
| 71 | |
| 72 | def keyevent(self, keycode: int, metastate: Optional[int] = None) -> Self: |
| 73 | """Sends a keycode to the device. |
| 74 | |
| 75 | Android only. |
| 76 | Possible keycodes can be found in http://developer.android.com/reference/android/view/KeyEvent.html. |
| 77 | |
| 78 | Args: |
| 79 | keycode: the keycode to be sent to the device |
| 80 | metastate: meta information about the keycode being sent |
| 81 | |
| 82 | Returns: |
| 83 | Union['WebDriver', 'Keyboard']: Self instance |
| 84 | """ |
| 85 | return self.press_keycode(keycode=keycode, metastate=metastate) |
| 86 | |
| 87 | def press_keycode(self, keycode: int, metastate: Optional[int] = None, flags: Optional[int] = None) -> Self: |
| 88 | """Sends a keycode to the device. |