@midscene/web 0.8.7 → 0.8.8-beta-20241223032721.0

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/appium.js CHANGED
@@ -1032,10 +1032,16 @@ var PageTaskExecutor = class {
1032
1032
  (async () => {
1033
1033
  await (0, import_utils3.sleep)(100);
1034
1034
  if (this.page.waitUntilNetworkIdle) {
1035
- await this.page.waitUntilNetworkIdle();
1035
+ try {
1036
+ await this.page.waitUntilNetworkIdle({
1037
+ idleTime: 100,
1038
+ timeout: 800
1039
+ });
1040
+ } catch (error) {
1041
+ }
1036
1042
  }
1037
1043
  })(),
1038
- (0, import_utils3.sleep)(300)
1044
+ (0, import_utils3.sleep)(200)
1039
1045
  ]);
1040
1046
  }
1041
1047
  if (appendAfterExecution) {
@@ -628,10 +628,16 @@ var PageTaskExecutor = class {
628
628
  (async () => {
629
629
  await (0, import_utils5.sleep)(100);
630
630
  if (this.page.waitUntilNetworkIdle) {
631
- await this.page.waitUntilNetworkIdle();
631
+ try {
632
+ await this.page.waitUntilNetworkIdle({
633
+ idleTime: 100,
634
+ timeout: 800
635
+ });
636
+ } catch (error) {
637
+ }
632
638
  }
633
639
  })(),
634
- (0, import_utils5.sleep)(300)
640
+ (0, import_utils5.sleep)(200)
635
641
  ]);
636
642
  }
637
643
  if (appendAfterExecution) {
package/dist/es/index.js CHANGED
@@ -1040,10 +1040,16 @@ var PageTaskExecutor = class {
1040
1040
  (async () => {
1041
1041
  await (0, import_utils3.sleep)(100);
1042
1042
  if (this.page.waitUntilNetworkIdle) {
1043
- await this.page.waitUntilNetworkIdle();
1043
+ try {
1044
+ await this.page.waitUntilNetworkIdle({
1045
+ idleTime: 100,
1046
+ timeout: 800
1047
+ });
1048
+ } catch (error) {
1049
+ }
1044
1050
  }
1045
1051
  })(),
1046
- (0, import_utils3.sleep)(300)
1052
+ (0, import_utils3.sleep)(200)
1047
1053
  ]);
1048
1054
  }
1049
1055
  if (appendAfterExecution) {
@@ -2172,8 +2178,9 @@ var WebPage2 = class extends Page {
2172
2178
  }
2173
2179
  async waitUntilNetworkIdle(options) {
2174
2180
  await this.underlyingPage.waitForNetworkIdle({
2175
- idleTime: (options == null ? void 0 : options.idleTime) || 500,
2176
- concurrency: (options == null ? void 0 : options.concurrency) || 2
2181
+ idleTime: (options == null ? void 0 : options.idleTime) || 300,
2182
+ concurrency: (options == null ? void 0 : options.concurrency) || 2,
2183
+ timeout: (options == null ? void 0 : options.timeout) || 15e3
2177
2184
  });
2178
2185
  }
2179
2186
  };
@@ -965,10 +965,16 @@ var PageTaskExecutor = class {
965
965
  (async () => {
966
966
  await (0, import_utils5.sleep)(100);
967
967
  if (this.page.waitUntilNetworkIdle) {
968
- await this.page.waitUntilNetworkIdle();
968
+ try {
969
+ await this.page.waitUntilNetworkIdle({
970
+ idleTime: 100,
971
+ timeout: 800
972
+ });
973
+ } catch (error) {
974
+ }
969
975
  }
970
976
  })(),
971
- (0, import_utils5.sleep)(300)
977
+ (0, import_utils5.sleep)(200)
972
978
  ]);
973
979
  }
974
980
  if (appendAfterExecution) {
@@ -628,10 +628,16 @@ var PageTaskExecutor = class {
628
628
  (async () => {
629
629
  await (0, import_utils5.sleep)(100);
630
630
  if (this.page.waitUntilNetworkIdle) {
631
- await this.page.waitUntilNetworkIdle();
631
+ try {
632
+ await this.page.waitUntilNetworkIdle({
633
+ idleTime: 100,
634
+ timeout: 800
635
+ });
636
+ } catch (error) {
637
+ }
632
638
  }
633
639
  })(),
634
- (0, import_utils5.sleep)(300)
640
+ (0, import_utils5.sleep)(200)
635
641
  ]);
636
642
  }
637
643
  if (appendAfterExecution) {
@@ -518,10 +518,16 @@ var PageTaskExecutor = class {
518
518
  (async () => {
519
519
  await (0, import_utils3.sleep)(100);
520
520
  if (this.page.waitUntilNetworkIdle) {
521
- await this.page.waitUntilNetworkIdle();
521
+ try {
522
+ await this.page.waitUntilNetworkIdle({
523
+ idleTime: 100,
524
+ timeout: 800
525
+ });
526
+ } catch (error) {
527
+ }
522
528
  }
523
529
  })(),
524
- (0, import_utils3.sleep)(300)
530
+ (0, import_utils3.sleep)(200)
525
531
  ]);
526
532
  }
527
533
  if (appendAfterExecution) {
@@ -514,10 +514,16 @@ var PageTaskExecutor = class {
514
514
  (async () => {
515
515
  await (0, import_utils3.sleep)(100);
516
516
  if (this.page.waitUntilNetworkIdle) {
517
- await this.page.waitUntilNetworkIdle();
517
+ try {
518
+ await this.page.waitUntilNetworkIdle({
519
+ idleTime: 100,
520
+ timeout: 800
521
+ });
522
+ } catch (error) {
523
+ }
518
524
  }
519
525
  })(),
520
- (0, import_utils3.sleep)(300)
526
+ (0, import_utils3.sleep)(200)
521
527
  ]);
522
528
  }
523
529
  if (appendAfterExecution) {
@@ -1484,8 +1490,9 @@ var WebPage = class extends Page {
1484
1490
  }
1485
1491
  async waitUntilNetworkIdle(options) {
1486
1492
  await this.underlyingPage.waitForNetworkIdle({
1487
- idleTime: (options == null ? void 0 : options.idleTime) || 500,
1488
- concurrency: (options == null ? void 0 : options.concurrency) || 2
1493
+ idleTime: (options == null ? void 0 : options.idleTime) || 300,
1494
+ concurrency: (options == null ? void 0 : options.concurrency) || 2,
1495
+ timeout: (options == null ? void 0 : options.timeout) || 15e3
1489
1496
  });
1490
1497
  }
1491
1498
  };
@@ -1032,10 +1032,16 @@ var PageTaskExecutor = class {
1032
1032
  (async () => {
1033
1033
  await (0, import_utils3.sleep)(100);
1034
1034
  if (this.page.waitUntilNetworkIdle) {
1035
- await this.page.waitUntilNetworkIdle();
1035
+ try {
1036
+ await this.page.waitUntilNetworkIdle({
1037
+ idleTime: 100,
1038
+ timeout: 800
1039
+ });
1040
+ } catch (error) {
1041
+ }
1036
1042
  }
1037
1043
  })(),
1038
- (0, import_utils3.sleep)(300)
1044
+ (0, import_utils3.sleep)(200)
1039
1045
  ]);
1040
1046
  }
1041
1047
  if (appendAfterExecution) {
@@ -628,10 +628,16 @@ var PageTaskExecutor = class {
628
628
  (async () => {
629
629
  await (0, import_utils5.sleep)(100);
630
630
  if (this.page.waitUntilNetworkIdle) {
631
- await this.page.waitUntilNetworkIdle();
631
+ try {
632
+ await this.page.waitUntilNetworkIdle({
633
+ idleTime: 100,
634
+ timeout: 800
635
+ });
636
+ } catch (error) {
637
+ }
632
638
  }
633
639
  })(),
634
- (0, import_utils5.sleep)(300)
640
+ (0, import_utils5.sleep)(200)
635
641
  ]);
636
642
  }
637
643
  if (appendAfterExecution) {
package/dist/lib/index.js CHANGED
@@ -1040,10 +1040,16 @@ var PageTaskExecutor = class {
1040
1040
  (async () => {
1041
1041
  await (0, import_utils3.sleep)(100);
1042
1042
  if (this.page.waitUntilNetworkIdle) {
1043
- await this.page.waitUntilNetworkIdle();
1043
+ try {
1044
+ await this.page.waitUntilNetworkIdle({
1045
+ idleTime: 100,
1046
+ timeout: 800
1047
+ });
1048
+ } catch (error) {
1049
+ }
1044
1050
  }
1045
1051
  })(),
1046
- (0, import_utils3.sleep)(300)
1052
+ (0, import_utils3.sleep)(200)
1047
1053
  ]);
1048
1054
  }
1049
1055
  if (appendAfterExecution) {
@@ -2172,8 +2178,9 @@ var WebPage2 = class extends Page {
2172
2178
  }
2173
2179
  async waitUntilNetworkIdle(options) {
2174
2180
  await this.underlyingPage.waitForNetworkIdle({
2175
- idleTime: (options == null ? void 0 : options.idleTime) || 500,
2176
- concurrency: (options == null ? void 0 : options.concurrency) || 2
2181
+ idleTime: (options == null ? void 0 : options.idleTime) || 300,
2182
+ concurrency: (options == null ? void 0 : options.concurrency) || 2,
2183
+ timeout: (options == null ? void 0 : options.timeout) || 15e3
2177
2184
  });
2178
2185
  }
2179
2186
  };
@@ -965,10 +965,16 @@ var PageTaskExecutor = class {
965
965
  (async () => {
966
966
  await (0, import_utils5.sleep)(100);
967
967
  if (this.page.waitUntilNetworkIdle) {
968
- await this.page.waitUntilNetworkIdle();
968
+ try {
969
+ await this.page.waitUntilNetworkIdle({
970
+ idleTime: 100,
971
+ timeout: 800
972
+ });
973
+ } catch (error) {
974
+ }
969
975
  }
970
976
  })(),
971
- (0, import_utils5.sleep)(300)
977
+ (0, import_utils5.sleep)(200)
972
978
  ]);
973
979
  }
974
980
  if (appendAfterExecution) {
@@ -628,10 +628,16 @@ var PageTaskExecutor = class {
628
628
  (async () => {
629
629
  await (0, import_utils5.sleep)(100);
630
630
  if (this.page.waitUntilNetworkIdle) {
631
- await this.page.waitUntilNetworkIdle();
631
+ try {
632
+ await this.page.waitUntilNetworkIdle({
633
+ idleTime: 100,
634
+ timeout: 800
635
+ });
636
+ } catch (error) {
637
+ }
632
638
  }
633
639
  })(),
634
- (0, import_utils5.sleep)(300)
640
+ (0, import_utils5.sleep)(200)
635
641
  ]);
636
642
  }
637
643
  if (appendAfterExecution) {
@@ -518,10 +518,16 @@ var PageTaskExecutor = class {
518
518
  (async () => {
519
519
  await (0, import_utils3.sleep)(100);
520
520
  if (this.page.waitUntilNetworkIdle) {
521
- await this.page.waitUntilNetworkIdle();
521
+ try {
522
+ await this.page.waitUntilNetworkIdle({
523
+ idleTime: 100,
524
+ timeout: 800
525
+ });
526
+ } catch (error) {
527
+ }
522
528
  }
523
529
  })(),
524
- (0, import_utils3.sleep)(300)
530
+ (0, import_utils3.sleep)(200)
525
531
  ]);
526
532
  }
527
533
  if (appendAfterExecution) {
@@ -514,10 +514,16 @@ var PageTaskExecutor = class {
514
514
  (async () => {
515
515
  await (0, import_utils3.sleep)(100);
516
516
  if (this.page.waitUntilNetworkIdle) {
517
- await this.page.waitUntilNetworkIdle();
517
+ try {
518
+ await this.page.waitUntilNetworkIdle({
519
+ idleTime: 100,
520
+ timeout: 800
521
+ });
522
+ } catch (error) {
523
+ }
518
524
  }
519
525
  })(),
520
- (0, import_utils3.sleep)(300)
526
+ (0, import_utils3.sleep)(200)
521
527
  ]);
522
528
  }
523
529
  if (appendAfterExecution) {
@@ -1484,8 +1490,9 @@ var WebPage = class extends Page {
1484
1490
  }
1485
1491
  async waitUntilNetworkIdle(options) {
1486
1492
  await this.underlyingPage.waitForNetworkIdle({
1487
- idleTime: (options == null ? void 0 : options.idleTime) || 500,
1488
- concurrency: (options == null ? void 0 : options.concurrency) || 2
1493
+ idleTime: (options == null ? void 0 : options.idleTime) || 300,
1494
+ concurrency: (options == null ? void 0 : options.concurrency) || 2,
1495
+ timeout: (options == null ? void 0 : options.timeout) || 15e3
1489
1496
  });
1490
1497
  }
1491
1498
  };
@@ -1,5 +1,5 @@
1
- export { P as AppiumAgent } from './tasks-969c0e3e.js';
2
- export { P as AppiumPage } from './page-b9196527.js';
1
+ export { P as AppiumAgent } from './tasks-ad047e1d.js';
2
+ export { P as AppiumPage } from './page-f7abc956.js';
3
3
  import '@midscene/core/dist/lib/types/types-55182ae1';
4
4
  import '@midscene/core';
5
5
  import '@midscene/shared/fs';
@@ -1,6 +1,6 @@
1
- import { C as ChromeExtensionProxyPage } from './page-b9196527.js';
2
- export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from './page-b9196527.js';
3
- import { P as PageAgent } from './tasks-969c0e3e.js';
1
+ import { C as ChromeExtensionProxyPage } from './page-f7abc956.js';
2
+ export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from './page-f7abc956.js';
3
+ import { P as PageAgent } from './tasks-ad047e1d.js';
4
4
  import 'playwright';
5
5
  import '@midscene/core/.';
6
6
  import 'puppeteer';
@@ -1,5 +1,5 @@
1
1
  import { writeFileSync } from 'node:fs';
2
- import { W as WebPage, E as ElementInfo } from './page-b9196527.js';
2
+ import { W as WebPage, E as ElementInfo } from './page-f7abc956.js';
3
3
  import 'playwright';
4
4
  import '@midscene/core/.';
5
5
  import 'puppeteer';
@@ -1,6 +1,6 @@
1
1
  export { PlayWrightAiFixtureType, PlaywrightAiFixture } from './playwright.js';
2
- export { P as AppiumAgent, P as PlaywrightAgent } from './tasks-969c0e3e.js';
3
- export { P as AppiumPage } from './page-b9196527.js';
2
+ export { P as AppiumAgent, P as PlaywrightAgent } from './tasks-ad047e1d.js';
3
+ export { P as AppiumPage } from './page-f7abc956.js';
4
4
  export { StaticPageAgent } from './playground.js';
5
5
  export { PuppeteerAgent } from './puppeteer.js';
6
6
  export { generateExtractData } from './debug.js';
@@ -247,6 +247,7 @@ declare class WebPage$2 extends Page<'puppeteer', Page$2> {
247
247
  waitUntilNetworkIdle(options?: {
248
248
  idleTime?: number;
249
249
  concurrency?: number;
250
+ timeout?: number;
250
251
  }): Promise<void>;
251
252
  }
252
253
 
@@ -1,6 +1,6 @@
1
- import { S as StaticPage } from './page-b9196527.js';
2
- export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from './page-b9196527.js';
3
- import { P as PageAgent } from './tasks-969c0e3e.js';
1
+ import { S as StaticPage } from './page-f7abc956.js';
2
+ export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from './page-f7abc956.js';
3
+ import { P as PageAgent } from './tasks-ad047e1d.js';
4
4
  import 'playwright';
5
5
  import '@midscene/core/.';
6
6
  import 'puppeteer';
@@ -1,9 +1,9 @@
1
1
  import { AgentWaitForOpt } from '@midscene/core/.';
2
2
  import { TestInfo } from '@playwright/test';
3
3
  import { Page } from 'playwright';
4
- import { b as PageTaskExecutor } from './tasks-969c0e3e.js';
5
- export { P as PlaywrightAgent } from './tasks-969c0e3e.js';
6
- export { c as PlaywrightWebPage } from './page-b9196527.js';
4
+ import { b as PageTaskExecutor } from './tasks-ad047e1d.js';
5
+ export { P as PlaywrightAgent } from './tasks-ad047e1d.js';
6
+ export { c as PlaywrightWebPage } from './page-f7abc956.js';
7
7
  export { overrideAIConfig } from '@midscene/core';
8
8
  import '@midscene/core/dist/lib/types/types-55182ae1';
9
9
  import '@midscene/shared/fs';
@@ -1,6 +1,6 @@
1
- import { P as PageAgent, a as PageAgentOpt } from './tasks-969c0e3e.js';
1
+ import { P as PageAgent, a as PageAgentOpt } from './tasks-ad047e1d.js';
2
2
  import { Page } from 'puppeteer';
3
- export { a as PuppeteerWebPage } from './page-b9196527.js';
3
+ export { a as PuppeteerWebPage } from './page-f7abc956.js';
4
4
  export { overrideAIConfig } from '@midscene/core';
5
5
  import '@midscene/core/dist/lib/types/types-55182ae1';
6
6
  import '@midscene/shared/fs';
@@ -1,5 +1,5 @@
1
1
  import * as _midscene_core_dist_lib_types_types_55182ae1 from '@midscene/core/dist/lib/types/types-55182ae1';
2
- import { d as WebUIContext, W as WebPage, e as WebElementInfo } from './page-b9196527.js';
2
+ import { d as WebUIContext, W as WebPage, e as WebElementInfo } from './page-f7abc956.js';
3
3
  import { PlanningAIResponse, AIElementIdResponse, Insight, GroupedActionDump, InsightAction, ExecutionDump, ExecutionTaskProgressOptions, AgentAssertOpt, AgentWaitForOpt, InsightExtractParam, InsightAssertionResponse, PlanningActionParamWaitFor, Executor } from '@midscene/core';
4
4
  import { getRunningPkgInfo } from '@midscene/shared/fs';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import '@midscene/core';
2
- export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED, d as WebUIContext, i as generateCacheId, h as getCurrentExecutionFile, g as getExtraReturnLogic, p as parseContextFromWebPage, f as printReportMsg, r as reportFileName } from './page-b9196527.js';
2
+ export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED, d as WebUIContext, i as generateCacheId, h as getCurrentExecutionFile, g as getExtraReturnLogic, p as parseContextFromWebPage, f as printReportMsg, r as reportFileName } from './page-f7abc956.js';
3
3
  import 'playwright';
4
4
  import '@midscene/core/.';
5
5
  import 'puppeteer';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midscene/web",
3
3
  "description": "An AI-powered automation SDK can control the page, perform assertions, and extract data in JSON format using natural language. See https://midscenejs.com/ for details.",
4
- "version": "0.8.7",
4
+ "version": "0.8.8-beta-20241223032721.0",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "jsnext:source": "./src/index.ts",
@@ -72,8 +72,8 @@
72
72
  "express": "4.21.1",
73
73
  "inquirer": "10.1.5",
74
74
  "openai": "4.57.1",
75
- "@midscene/shared": "0.8.7",
76
- "@midscene/core": "0.8.7"
75
+ "@midscene/shared": "0.8.8-beta-20241223032721.0",
76
+ "@midscene/core": "0.8.8-beta-20241223032721.0"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@modern-js/module-tools": "2.60.6",