Created
March 7, 2023 16:58
-
-
Save mghadam/c7e0f2ec05e5a8fb2a68013697977054 to your computer and use it in GitHub Desktop.
Pressing Enter/Tab Keys using Chrome debugging protocol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchKeyEvent | |
# https://github.com/ChromeDevTools/devtools-protocol/issues/45#issuecomment-850953391 | |
# https://groups.google.com/g/chrome-debugging-protocol/c/DQxlrBNSC9w | |
# Pressing the Tab Key | |
tab.call_method("Input.dispatchKeyEvent", type="rawKeyDown", windowsVirtualKeyCode=9, key="Tab", unmodifiedText="\t", text="\t") | |
# Pressing the Enter key | |
tab.call_method("Input.dispatchKeyEvent", type="rawKeyDown", windowsVirtualKeyCode=13, key="Enter", unmodifiedText="\r", text="\r") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment