新增表单提交功能:在浏览器命令中添加 submitForm 方法,支持通过选择器填写输入框并提交表单

This commit is contained in:
fofolee
2025-01-23 10:46:52 +08:00
parent f4245a5744
commit 603cadb2ef
3 changed files with 47 additions and 1 deletions

View File

@@ -326,7 +326,7 @@ const executeScript = async (tab, script, args = {}) => {
const argValues = Object.values(args).map((v) => JSON.stringify(v));
const wrappedScript = `
(function(${argNames.join(", ")}) {
(async function(${argNames.join(", ")}) {
${script}
})(${argValues.join(", ")})
`;