Improve autosubmit via Chromium's debugger
This commit is contained in:
@@ -327,14 +327,17 @@ async function dispatchFocusOrSubmit(settings, request, allFrames, allowForeign)
|
|||||||
for (let frame of perFrameResults) {
|
for (let frame of perFrameResults) {
|
||||||
if (frame.needPressEnter) {
|
if (frame.needPressEnter) {
|
||||||
chrome.debugger.attach({ tabId: settings.tab.id }, "1.2");
|
chrome.debugger.attach({ tabId: settings.tab.id }, "1.2");
|
||||||
for (let type of ["keyDown", "keyUp"]) {
|
for (let type of ["keyDown", "char", "keyUp"]) {
|
||||||
chrome.debugger.sendCommand(
|
chrome.debugger.sendCommand(
|
||||||
{ tabId: settings.tab.id },
|
{ tabId: settings.tab.id },
|
||||||
"Input.dispatchKeyEvent",
|
"Input.dispatchKeyEvent",
|
||||||
{
|
{
|
||||||
type: type,
|
type: type,
|
||||||
|
key: "Enter",
|
||||||
windowsVirtualKeyCode: 13,
|
windowsVirtualKeyCode: 13,
|
||||||
nativeVirtualKeyCode: 13
|
nativeVirtualKeyCode: 13,
|
||||||
|
unmodifiedText: "\r",
|
||||||
|
text: "\r"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user