n8n-nodes-klib-midscene 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -118262,7 +118262,12 @@ var MidsceneBrowser = class {
118262
118262
  ]
118263
118263
  }
118264
118264
  },
118265
- default: "",
118265
+ default: `
118266
+ await agent.connectNewTabWithUrl('https://www.bing.com');
118267
+ await agent.aiAct('type "AI 101" and hit Enter');
118268
+ await agent.aiAssert('there are some search results');
118269
+ await agent.destroy();
118270
+ `,
118266
118271
  placeholder: '// await agent.aiAction("Search for n8n");\n// return { title: await agent.title() };',
118267
118272
  description: "JavaScript code to execute. Variables `agent` is available.",
118268
118273
  typeOptions: {
@@ -118340,12 +118345,14 @@ MIDSCENE_USE_QWEN3_VL=true`,
118340
118345
  }
118341
118346
  }
118342
118347
  if (scriptType === "js") {
118348
+ const sleep4 = (ms) => new Promise((r) => setTimeout(r, ms));
118343
118349
  const script = this.getNodeParameter("script", 0);
118344
118350
  const sandbox = {
118345
118351
  agent,
118346
118352
  items,
118347
118353
  console,
118348
- require
118354
+ require,
118355
+ sleep: sleep4
118349
118356
  };
118350
118357
  vm.createContext(sandbox);
118351
118358
  const result = await vm.runInContext(`(async () => { ${script} })()`, sandbox);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-klib-midscene",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "n8n nodes for Midscene.js integration",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",