mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-10-02 07:34:35 +08:00
69 lines
2.1 KiB
JavaScript
69 lines
2.1 KiB
JavaScript
export const OPERATION_CATALOG = [
|
|
{ operation: "session.start" },
|
|
{ operation: "session.stop" },
|
|
{ operation: "session.list" },
|
|
{ operation: "page.navigate" },
|
|
{ operation: "page.back" },
|
|
{ operation: "page.forward" },
|
|
{ operation: "page.reload" },
|
|
{ operation: "page.wait" },
|
|
{ operation: "inspect.observe" },
|
|
{ operation: "inspect.snapshot" },
|
|
{ operation: "inspect.html" },
|
|
{ operation: "inspect.screenshot" },
|
|
{ operation: "inspect.console" },
|
|
{ operation: "inspect.network" },
|
|
{ operation: "interact.click" },
|
|
{ operation: "interact.hover" },
|
|
{ operation: "interact.fill" },
|
|
{ operation: "interact.select" },
|
|
{ operation: "interact.press" },
|
|
{ operation: "tabs.list" },
|
|
{ operation: "tabs.create" },
|
|
{ operation: "tabs.select" },
|
|
{ operation: "tabs.close" },
|
|
{
|
|
operation: "tabs.borrow",
|
|
manualNote: "requires an existing user tab and ownership confirmation",
|
|
},
|
|
{ operation: "tabs.return", manualNote: "paired with borrowing a real user tab" },
|
|
{ operation: "assist.resize" },
|
|
{ operation: "assist.emulate" },
|
|
{ operation: "assist.request-help", manualNote: "intentionally waits for human interaction" },
|
|
];
|
|
|
|
export const WORKFLOW_ACTION_OPERATIONS = {
|
|
navigate: "page.navigate",
|
|
back: "page.back",
|
|
forward: "page.forward",
|
|
reload: "page.reload",
|
|
wait: "page.wait",
|
|
observe: "inspect.observe",
|
|
snapshot: "inspect.snapshot",
|
|
html: "inspect.html",
|
|
screenshot: "inspect.screenshot",
|
|
console: "inspect.console",
|
|
network: "inspect.network",
|
|
click: "interact.click",
|
|
hover: "interact.hover",
|
|
fill: "interact.fill",
|
|
select: "interact.select",
|
|
press: "interact.press",
|
|
"tab-list": "tabs.list",
|
|
"tab-create": "tabs.create",
|
|
"tab-select": "tabs.select",
|
|
"tab-close": "tabs.close",
|
|
borrow: "tabs.borrow",
|
|
return: "tabs.return",
|
|
resize: "assist.resize",
|
|
emulate: "assist.emulate",
|
|
"request-help": "assist.request-help",
|
|
};
|
|
|
|
export const WORKFLOW_ACTIONS = new Set([
|
|
...Object.keys(WORKFLOW_ACTION_OPERATIONS),
|
|
"wait-site-event",
|
|
]);
|
|
|
|
export const OPERATION_NAMES = new Set(OPERATION_CATALOG.map(({ operation }) => operation));
|