@midscene/web 0.1.0 → 0.1.1

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.
package/dist/es/index.js CHANGED
@@ -278,9 +278,7 @@ var PageTaskExecutor = class {
278
278
  const taskFind = {
279
279
  type: "Insight",
280
280
  subType: "Locate",
281
- param: {
282
- prompt: plan2.thought
283
- },
281
+ param: plan2.param,
284
282
  executor: async (param) => {
285
283
  let insightDump;
286
284
  const dumpCollector = (dump) => {
@@ -332,7 +330,10 @@ var PageTaskExecutor = class {
332
330
  type: "Action",
333
331
  subType: "Input",
334
332
  param: plan2.param,
335
- executor: async (taskParam) => {
333
+ executor: async (taskParam, { element }) => {
334
+ if (element) {
335
+ await this.page.mouse.click(element.center[0], element.center[1]);
336
+ }
336
337
  assert2(taskParam.value, "No value to input");
337
338
  await this.page.keyboard.type(taskParam.value);
338
339
  }
package/dist/lib/index.js CHANGED
@@ -309,9 +309,7 @@ var PageTaskExecutor = class {
309
309
  const taskFind = {
310
310
  type: "Insight",
311
311
  subType: "Locate",
312
- param: {
313
- prompt: plan2.thought
314
- },
312
+ param: plan2.param,
315
313
  executor: async (param) => {
316
314
  let insightDump;
317
315
  const dumpCollector = (dump) => {
@@ -363,7 +361,10 @@ var PageTaskExecutor = class {
363
361
  type: "Action",
364
362
  subType: "Input",
365
363
  param: plan2.param,
366
- executor: async (taskParam) => {
364
+ executor: async (taskParam, { element }) => {
365
+ if (element) {
366
+ await this.page.mouse.click(element.center[0], element.center[1]);
367
+ }
367
368
  (0, import_assert2.default)(taskParam.value, "No value to input");
368
369
  await this.page.keyboard.type(taskParam.value);
369
370
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midscene/web",
3
3
  "description": "Web integration for MidScene.js",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "jsnext:source": "./src/index.ts",
6
6
  "main": "./dist/lib/index.js",
7
7
  "module": "./dist/es/index.js",
@@ -15,7 +15,7 @@
15
15
  "./playwright-report": {
16
16
  "types": "./dist/types/playwright-report.d.ts",
17
17
  "import": "./dist/es/playwright-report.js",
18
- "require": "./dist/lib/inplaywright-report.js"
18
+ "require": "./dist/lib/playwright-report.js"
19
19
  },
20
20
  "./constants": {
21
21
  "types": "./dist/types/constants.d.ts",
@@ -52,8 +52,8 @@
52
52
  "openai": "4.47.1",
53
53
  "sharp": "0.33.3",
54
54
  "inquirer": "10.1.5",
55
- "@midscene/core": "0.1.0",
56
- "@midscene/visualizer-report": "0.1.0"
55
+ "@midscene/core": "0.1.1",
56
+ "@midscene/visualizer-report": "0.1.1"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@modern-js/module-tools": "^2.54.2",