@midscene/web 1.15.3 → 1.15.4-beta-20261013083552.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/agent-tools-puppeteer.mjs +3 -2
- package/dist/es/agent-tools-puppeteer.mjs.map +1 -1
- package/dist/es/bridge-mode/io-client.mjs +1 -1
- package/dist/es/bridge-mode/io-server.mjs +2 -2
- package/dist/es/bridge-mode/io-server.mjs.map +1 -1
- package/dist/es/bridge-mode/page-browser-side.mjs +1 -1
- package/dist/es/bridge-mode/page-browser-side.mjs.map +1 -1
- package/dist/es/cli.mjs +1 -1
- package/dist/es/common/persistent-puppeteer-viewport.mjs +27 -0
- package/dist/es/common/persistent-puppeteer-viewport.mjs.map +1 -0
- package/dist/es/{playwright → common}/test-runner/cookies.mjs +56 -79
- package/dist/es/common/test-runner/cookies.mjs.map +1 -0
- package/dist/es/common/test-runner/driver.mjs +0 -0
- package/dist/es/common/test-runner/nodes.mjs +139 -0
- package/dist/es/common/test-runner/nodes.mjs.map +1 -0
- package/dist/es/common/test-runner/utils.mjs +24 -0
- package/dist/es/common/test-runner/utils.mjs.map +1 -0
- package/dist/es/playwright/test-runner/agent-nodes.mjs +3 -10
- package/dist/es/playwright/test-runner/agent-nodes.mjs.map +1 -1
- package/dist/es/playwright/test-runner/driver.mjs +42 -0
- package/dist/es/playwright/test-runner/driver.mjs.map +1 -0
- package/dist/es/playwright/test-runner/index.mjs +1 -4
- package/dist/es/playwright/test-runner/utils.mjs +1 -21
- package/dist/es/playwright/test-runner/utils.mjs.map +1 -1
- package/dist/es/puppeteer/browser-agent.mjs +9 -1
- package/dist/es/puppeteer/browser-agent.mjs.map +1 -1
- package/dist/es/puppeteer/page-agent.mjs +19 -1
- package/dist/es/puppeteer/page-agent.mjs.map +1 -1
- package/dist/es/puppeteer/test-runner/agent-nodes.mjs +6 -0
- package/dist/es/puppeteer/test-runner/agent-nodes.mjs.map +1 -0
- package/dist/es/puppeteer/test-runner/driver.mjs +44 -0
- package/dist/es/puppeteer/test-runner/driver.mjs.map +1 -0
- package/dist/es/puppeteer/test-runner/index.mjs +3 -0
- package/dist/es/puppeteer/test-runner/types.mjs +0 -0
- package/dist/es/puppeteer/test-runner/utils.mjs +8 -0
- package/dist/es/puppeteer/test-runner/utils.mjs.map +1 -0
- package/dist/lib/agent-tools-puppeteer.js +3 -2
- package/dist/lib/agent-tools-puppeteer.js.map +1 -1
- package/dist/lib/bridge-mode/io-client.js +1 -1
- package/dist/lib/bridge-mode/io-server.js +2 -2
- package/dist/lib/bridge-mode/io-server.js.map +1 -1
- package/dist/lib/bridge-mode/page-browser-side.js +1 -1
- package/dist/lib/bridge-mode/page-browser-side.js.map +1 -1
- package/dist/lib/cli.js +1 -1
- package/dist/lib/common/persistent-puppeteer-viewport.js +61 -0
- package/dist/lib/common/persistent-puppeteer-viewport.js.map +1 -0
- package/dist/lib/{playwright → common}/test-runner/cookies.js +58 -81
- package/dist/lib/common/test-runner/cookies.js.map +1 -0
- package/dist/lib/common/test-runner/driver.js +20 -0
- package/dist/lib/common/test-runner/driver.js.map +1 -0
- package/dist/lib/common/test-runner/nodes.js +185 -0
- package/dist/lib/common/test-runner/nodes.js.map +1 -0
- package/dist/lib/common/test-runner/utils.js +61 -0
- package/dist/lib/common/test-runner/utils.js.map +1 -0
- package/dist/lib/playwright/test-runner/agent-nodes.js +3 -10
- package/dist/lib/playwright/test-runner/agent-nodes.js.map +1 -1
- package/dist/lib/playwright/test-runner/driver.js +76 -0
- package/dist/lib/playwright/test-runner/driver.js.map +1 -0
- package/dist/lib/playwright/test-runner/index.js +5 -8
- package/dist/lib/playwright/test-runner/utils.js +4 -24
- package/dist/lib/playwright/test-runner/utils.js.map +1 -1
- package/dist/lib/puppeteer/browser-agent.js +9 -1
- package/dist/lib/puppeteer/browser-agent.js.map +1 -1
- package/dist/lib/puppeteer/page-agent.js +19 -1
- package/dist/lib/puppeteer/page-agent.js.map +1 -1
- package/dist/lib/puppeteer/test-runner/agent-nodes.js +40 -0
- package/dist/lib/puppeteer/test-runner/agent-nodes.js.map +1 -0
- package/dist/lib/puppeteer/test-runner/driver.js +78 -0
- package/dist/lib/puppeteer/test-runner/driver.js.map +1 -0
- package/dist/lib/puppeteer/test-runner/index.js +51 -0
- package/dist/lib/puppeteer/test-runner/index.js.map +1 -0
- package/dist/lib/puppeteer/test-runner/types.js +20 -0
- package/dist/lib/puppeteer/test-runner/types.js.map +1 -0
- package/dist/lib/puppeteer/test-runner/utils.js +48 -0
- package/dist/lib/puppeteer/test-runner/utils.js.map +1 -0
- package/dist/types/agent-tools-puppeteer.d.ts.map +1 -1
- package/dist/types/common/persistent-puppeteer-viewport.d.ts +5 -0
- package/dist/types/common/persistent-puppeteer-viewport.d.ts.map +1 -0
- package/dist/types/common/test-runner/cookies.d.ts +52 -0
- package/dist/types/common/test-runner/cookies.d.ts.map +1 -0
- package/dist/types/common/test-runner/driver.d.ts +38 -0
- package/dist/types/common/test-runner/driver.d.ts.map +1 -0
- package/dist/types/common/test-runner/nodes.d.ts +38 -0
- package/dist/types/common/test-runner/nodes.d.ts.map +1 -0
- package/dist/types/common/test-runner/utils.d.ts +3 -0
- package/dist/types/common/test-runner/utils.d.ts.map +1 -0
- package/dist/types/playwright/test-runner/agent-nodes.d.ts +1 -2
- package/dist/types/playwright/test-runner/agent-nodes.d.ts.map +1 -1
- package/dist/types/playwright/test-runner/driver.d.ts +4 -0
- package/dist/types/playwright/test-runner/driver.d.ts.map +1 -0
- package/dist/types/playwright/test-runner/index.d.ts +2 -8
- package/dist/types/playwright/test-runner/index.d.ts.map +1 -1
- package/dist/types/playwright/test-runner/types.d.ts +5 -14
- package/dist/types/playwright/test-runner/types.d.ts.map +1 -1
- package/dist/types/playwright/test-runner/utils.d.ts +1 -2
- package/dist/types/playwright/test-runner/utils.d.ts.map +1 -1
- package/dist/types/puppeteer/browser-agent.d.ts +5 -0
- package/dist/types/puppeteer/browser-agent.d.ts.map +1 -1
- package/dist/types/puppeteer/index.d.ts +1 -1
- package/dist/types/puppeteer/index.d.ts.map +1 -1
- package/dist/types/puppeteer/page-agent.d.ts +8 -1
- package/dist/types/puppeteer/page-agent.d.ts.map +1 -1
- package/dist/types/puppeteer/test-runner/agent-nodes.d.ts +2 -0
- package/dist/types/puppeteer/test-runner/agent-nodes.d.ts.map +1 -0
- package/dist/types/puppeteer/test-runner/driver.d.ts +4 -0
- package/dist/types/puppeteer/test-runner/driver.d.ts.map +1 -0
- package/dist/types/puppeteer/test-runner/index.d.ts +5 -0
- package/dist/types/puppeteer/test-runner/index.d.ts.map +1 -0
- package/dist/types/puppeteer/test-runner/types.d.ts +18 -0
- package/dist/types/puppeteer/test-runner/types.d.ts.map +1 -0
- package/dist/types/puppeteer/test-runner/utils.d.ts +4 -0
- package/dist/types/puppeteer/test-runner/utils.d.ts.map +1 -0
- package/package.json +9 -4
- package/dist/es/playwright/test-runner/clear-cookies.mjs +0 -45
- package/dist/es/playwright/test-runner/clear-cookies.mjs.map +0 -1
- package/dist/es/playwright/test-runner/cookies.mjs.map +0 -1
- package/dist/es/playwright/test-runner/goto-url.mjs +0 -60
- package/dist/es/playwright/test-runner/goto-url.mjs.map +0 -1
- package/dist/es/playwright/test-runner/viewport.mjs +0 -35
- package/dist/es/playwright/test-runner/viewport.mjs.map +0 -1
- package/dist/lib/playwright/test-runner/clear-cookies.js +0 -82
- package/dist/lib/playwright/test-runner/clear-cookies.js.map +0 -1
- package/dist/lib/playwright/test-runner/cookies.js.map +0 -1
- package/dist/lib/playwright/test-runner/goto-url.js +0 -97
- package/dist/lib/playwright/test-runner/goto-url.js.map +0 -1
- package/dist/lib/playwright/test-runner/viewport.js +0 -72
- package/dist/lib/playwright/test-runner/viewport.js.map +0 -1
- package/dist/types/playwright/test-runner/clear-cookies.d.ts +0 -17
- package/dist/types/playwright/test-runner/clear-cookies.d.ts.map +0 -1
- package/dist/types/playwright/test-runner/cookies.d.ts +0 -33
- package/dist/types/playwright/test-runner/cookies.d.ts.map +0 -1
- package/dist/types/playwright/test-runner/goto-url.d.ts +0 -26
- package/dist/types/playwright/test-runner/goto-url.d.ts.map +0 -1
- package/dist/types/playwright/test-runner/viewport.d.ts +0 -14
- package/dist/types/playwright/test-runner/viewport.d.ts.map +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { PortableWebCookie, WebCookieSourceOptions } from './cookies';
|
|
2
|
+
export type WebNavigationWaitUntil = 'commit' | 'domcontentloaded' | 'load' | 'networkidle' | 'networkidle0' | 'networkidle2';
|
|
3
|
+
export interface WebNavigationOptions {
|
|
4
|
+
waitUntil: WebNavigationWaitUntil;
|
|
5
|
+
timeoutMs: number;
|
|
6
|
+
}
|
|
7
|
+
export interface WebCookieFilters {
|
|
8
|
+
name?: string;
|
|
9
|
+
domain?: string;
|
|
10
|
+
path?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface WebViewportSize {
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
/** Browser-neutral operations used by the built-in Web Test Runner Nodes. */
|
|
17
|
+
export interface WebTestDriver {
|
|
18
|
+
currentUrl(): string;
|
|
19
|
+
baseUrl(): string | undefined;
|
|
20
|
+
goto(url: string, options: WebNavigationOptions): Promise<{
|
|
21
|
+
status: number | null;
|
|
22
|
+
}>;
|
|
23
|
+
title(): Promise<string>;
|
|
24
|
+
setCookies(cookies: readonly PortableWebCookie[]): Promise<void>;
|
|
25
|
+
clearCookies(filters: WebCookieFilters): Promise<void>;
|
|
26
|
+
setViewportSize(size: WebViewportSize): Promise<WebViewportSize>;
|
|
27
|
+
}
|
|
28
|
+
export interface WebTestRunnerOptions<TAgent> extends WebCookieSourceOptions<TAgent> {
|
|
29
|
+
/** Base URL used to resolve relative gotoUrl inputs before first navigation. */
|
|
30
|
+
baseURL?: string;
|
|
31
|
+
}
|
|
32
|
+
/** A browser integration only implements this adapter, not individual Nodes. */
|
|
33
|
+
export interface WebTestDriverAdapter<TAgent, TOptions extends WebTestRunnerOptions<TAgent>> {
|
|
34
|
+
requireAgent(agent: unknown): TAgent;
|
|
35
|
+
createDriver(agent: TAgent): WebTestDriver;
|
|
36
|
+
getOptions(agent: TAgent): TOptions | undefined;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../../src/common/test-runner/driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAC9B,QAAQ,GACR,kBAAkB,GAClB,MAAM,GACN,aAAa,GACb,cAAc,GACd,cAAc,CAAC;AAEnB,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,sBAAsB,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,6EAA6E;AAC7E,MAAM,WAAW,aAAa;IAC5B,UAAU,IAAI,MAAM,CAAC;IACrB,OAAO,IAAI,MAAM,GAAG,SAAS,CAAC;IAC9B,IAAI,CACF,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IACtC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,UAAU,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,YAAY,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAClE;AAED,MAAM,WAAW,oBAAoB,CAAC,MAAM,CAC1C,SAAQ,sBAAsB,CAAC,MAAM,CAAC;IACtC,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,gFAAgF;AAChF,MAAM,WAAW,oBAAoB,CACnC,MAAM,EACN,QAAQ,SAAS,oBAAoB,CAAC,MAAM,CAAC;IAE7C,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACrC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,CAAC;IAC3C,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;CACjD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AgentTestRunnerNodeDefinition } from '@midscene/core/agent';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
|
+
import { setCookiesInputSchema } from './cookies';
|
|
4
|
+
import type { WebTestDriverAdapter, WebTestRunnerOptions } from './driver';
|
|
5
|
+
export declare const gotoUrlInputSchema: z.ZodObject<{
|
|
6
|
+
url: z.ZodString;
|
|
7
|
+
waitUntil: z.ZodDefault<z.ZodEnum<{
|
|
8
|
+
domcontentloaded: "domcontentloaded";
|
|
9
|
+
load: "load";
|
|
10
|
+
networkidle: "networkidle";
|
|
11
|
+
commit: "commit";
|
|
12
|
+
networkidle0: "networkidle0";
|
|
13
|
+
networkidle2: "networkidle2";
|
|
14
|
+
}>>;
|
|
15
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export type GotoUrlNodeInput = z.infer<typeof gotoUrlInputSchema>;
|
|
18
|
+
export interface GotoUrlNodeResult {
|
|
19
|
+
url: string;
|
|
20
|
+
status: number | null;
|
|
21
|
+
title: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const clearCookiesInputSchema: z.ZodObject<{
|
|
24
|
+
name: z.ZodOptional<z.ZodString>;
|
|
25
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
26
|
+
path: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
export type ClearCookiesNodeInput = z.infer<typeof clearCookiesInputSchema>;
|
|
29
|
+
export declare const setViewportSizeInputSchema: z.ZodObject<{
|
|
30
|
+
width: z.ZodNumber;
|
|
31
|
+
height: z.ZodNumber;
|
|
32
|
+
}, z.core.$strict>;
|
|
33
|
+
export type SetViewportSizeNodeInput = z.infer<typeof setViewportSizeInputSchema>;
|
|
34
|
+
/** Create the browser-neutral built-in Web Nodes for one browser adapter. */
|
|
35
|
+
export declare const createWebTestRunnerNodeDefinitions: <TAgent, TOptions extends WebTestRunnerOptions<TAgent>>(adapter: WebTestDriverAdapter<TAgent, TOptions>) => readonly AgentTestRunnerNodeDefinition[];
|
|
36
|
+
export { setCookiesInputSchema };
|
|
37
|
+
export type { SetCookiesNodeInput, SetCookiesNodeResult } from './cookies';
|
|
38
|
+
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../src/common/test-runner/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAGL,qBAAqB,EACtB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAEV,oBAAoB,EACpB,oBAAoB,EAErB,MAAM,UAAU,CAAC;AAMlB,eAAO,MAAM,kBAAkB;;;;;;;;;;;kBA0B7B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAElE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,uBAAuB;;;;kBAIlC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE5E,eAAO,MAAM,0BAA0B;;;kBAOrC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,0BAA0B,CAClC,CAAC;AAuBF,6EAA6E;AAC7E,eAAO,MAAM,kCAAkC,GAC7C,MAAM,EACN,QAAQ,SAAS,oBAAoB,CAAC,MAAM,CAAC,EAE7C,SAAS,oBAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,KAC9C,SAAS,6BAA6B,EAsHxC,CAAC;AAEF,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/test-runner/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,GAAI,QAAQ,WAAW,EAAE,WAAW,MAAM,SAIpE,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,QAAQ,MAAM,EACd,SAAS,MAAM,GAAG,SAAS,EAC3B,OAAO,MAAM,KACZ,MAsBF,CAAC"}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const playwrightAgentTestRunnerNodeDefinitions: readonly AgentTestRunnerNodeDefinition[];
|
|
1
|
+
export declare const playwrightAgentTestRunnerNodeDefinitions: readonly import("@midscene/core/agent").AgentTestRunnerNodeDefinition<Record<string, unknown>, unknown>[];
|
|
3
2
|
//# sourceMappingURL=agent-nodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-nodes.d.ts","sourceRoot":"","sources":["../../../../src/playwright/test-runner/agent-nodes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-nodes.d.ts","sourceRoot":"","sources":["../../../../src/playwright/test-runner/agent-nodes.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,wCAAwC,2GACY,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WebTestDriverAdapter } from '../../common/test-runner/driver';
|
|
2
|
+
import type { PlaywrightTestRunnerAgent, PlaywrightTestRunnerOptions } from './types';
|
|
3
|
+
export declare const playwrightTestDriverAdapter: WebTestDriverAdapter<PlaywrightTestRunnerAgent, PlaywrightTestRunnerOptions>;
|
|
4
|
+
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../../src/playwright/test-runner/driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EACV,yBAAyB,EACzB,2BAA2B,EAC5B,MAAM,SAAS,CAAC;AAsDjB,eAAO,MAAM,2BAA2B,EAAE,oBAAoB,CAC5D,yBAAyB,EACzB,2BAA2B,CAK5B,CAAC"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
export { clearCookiesInputSchema } from '
|
|
2
|
-
export type { ClearCookiesNodeInput } from '
|
|
3
|
-
export { setCookiesInputSchema } from './cookies';
|
|
4
|
-
export type { SetCookiesNodeInput, SetCookiesNodeResult, } from './cookies';
|
|
5
|
-
export { gotoUrlInputSchema } from './goto-url';
|
|
6
|
-
export type { GotoUrlNodeInput, GotoUrlNodeResult } from './goto-url';
|
|
1
|
+
export { clearCookiesInputSchema, gotoUrlInputSchema, setCookiesInputSchema, setViewportSizeInputSchema, } from '../../common/test-runner/nodes';
|
|
2
|
+
export type { ClearCookiesNodeInput, GotoUrlNodeInput, GotoUrlNodeResult, SetCookiesNodeInput, SetCookiesNodeResult, SetViewportSizeNodeInput, } from '../../common/test-runner/nodes';
|
|
7
3
|
export type { PlaywrightTestRunnerOptions, PlaywrightTestRunnerAgent, PlaywrightCookieProfileContext, PlaywrightNodeContext, } from './types';
|
|
8
|
-
export { setViewportSizeInputSchema } from './viewport';
|
|
9
|
-
export type { SetViewportSizeNodeInput } from './viewport';
|
|
10
4
|
export { playwrightAgentTestRunnerNodeDefinitions } from './agent-nodes';
|
|
11
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/playwright/test-runner/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/playwright/test-runner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,wCAAwC,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
import type { BrowserContext, Page } from 'playwright';
|
|
2
|
+
import type { CookieProfileContext, WebNodeContext } from '../../common/test-runner/cookies';
|
|
3
|
+
import type { WebTestRunnerOptions } from '../../common/test-runner/driver';
|
|
2
4
|
type Awaitable<T> = T | Promise<T>;
|
|
3
5
|
export type PlaywrightCookie = Parameters<BrowserContext['addCookies']>[0][number];
|
|
4
6
|
/** Runtime resources supplied by the test runner to Playwright Nodes. */
|
|
5
|
-
export
|
|
6
|
-
input: unknown;
|
|
7
|
-
context: TContext;
|
|
8
|
-
signal: AbortSignal;
|
|
9
|
-
}
|
|
7
|
+
export type PlaywrightNodeContext<TContext> = WebNodeContext<TContext>;
|
|
10
8
|
/** Context passed to a configured Playwright cookie profile resolver. */
|
|
11
|
-
export
|
|
12
|
-
/** Profile reference from the setCookies Node input. */
|
|
13
|
-
profile: string;
|
|
14
|
-
/** The Agent executing the current Node. */
|
|
15
|
-
context: TContext;
|
|
16
|
-
/** Cancellation signal for the current Node execution. */
|
|
17
|
-
signal: AbortSignal;
|
|
18
|
-
}
|
|
9
|
+
export type PlaywrightCookieProfileContext<TContext> = CookieProfileContext<TContext>;
|
|
19
10
|
/** Dependencies and source resolvers used by the Playwright preset Nodes. */
|
|
20
|
-
export interface PlaywrightTestRunnerOptions {
|
|
11
|
+
export interface PlaywrightTestRunnerOptions extends WebTestRunnerOptions<PlaywrightTestRunnerAgent> {
|
|
21
12
|
/**
|
|
22
13
|
* Return the environment used by setCookies. Defaults to process.env when
|
|
23
14
|
* omitted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/playwright/test-runner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/playwright/test-runner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEnC,MAAM,MAAM,gBAAgB,GAAG,UAAU,CACvC,cAAc,CAAC,YAAY,CAAC,CAC7B,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AACb,yEAAyE;AACzE,MAAM,MAAM,qBAAqB,CAAC,QAAQ,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAC;AAEvE,yEAAyE;AACzE,MAAM,MAAM,8BAA8B,CAAC,QAAQ,IACjD,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AAEjC,6EAA6E;AAC7E,MAAM,WAAW,2BACf,SAAQ,oBAAoB,CAAC,yBAAyB,CAAC;IACvD;;;OAGG;IACH,MAAM,CAAC,CACL,GAAG,EAAE,qBAAqB,CAAC,yBAAyB,CAAC,GACpD,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAC3D,4EAA4E;IAC5E,gBAAgB,CAAC,CACf,KAAK,EAAE,8BAA8B,CAAC,yBAAyB,CAAC,GAC/D,SAAS,CAAC,SAAS,gBAAgB,EAAE,CAAC,CAAC;IAC1C;;;OAGG;IACH,uBAAuB,CAAC,CACtB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,qBAAqB,CAAC,yBAAyB,CAAC,GACpD,SAAS,CAAC,MAAM,CAAC,CAAC;CACtB;AAED,4DAA4D;AAC5D,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE;QAAE,cAAc,EAAE,IAAI,CAAA;KAAE,CAAC;IACpC,QAAQ,CAAC,UAAU,CAAC,EAAE,2BAA2B,CAAC;CACnD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
+
export { resolveWebUrl, throwIfAborted } from '../../common/test-runner/utils';
|
|
1
2
|
import type { PlaywrightTestRunnerAgent } from './types';
|
|
2
|
-
export declare const throwIfAborted: (signal: AbortSignal, operation: string) => void;
|
|
3
|
-
export declare const resolveWebUrl: (target: string, baseUrl: string | undefined, label: string) => string;
|
|
4
3
|
export declare const requirePlaywrightAgent: (agent: unknown) => PlaywrightTestRunnerAgent;
|
|
5
4
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/playwright/test-runner/utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/playwright/test-runner/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,eAAO,MAAM,sBAAsB,GACjC,OAAO,OAAO,KACb,yBAeF,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { type BrowserPageManager, WebAgentCore } from '../common/browser-agent';
|
|
2
2
|
import type { WebPageAgentOpt } from '../web-element';
|
|
3
|
+
import type { AgentTestRunnerNodeDefinition } from '@midscene/core/agent';
|
|
3
4
|
import type { Browser as PuppeteerBrowser, Page as PuppeteerPage, Target as PuppeteerTarget } from 'puppeteer';
|
|
4
5
|
import type { PuppeteerBrowserPageScope } from './browser-page-manager';
|
|
5
6
|
import { PuppeteerWebPage } from './page';
|
|
7
|
+
import type { PuppeteerTestRunnerOptions } from './test-runner/types';
|
|
6
8
|
export type PuppeteerBrowserAgentOpt = Omit<WebPageAgentOpt, 'forceSameTabNavigation'> & {
|
|
9
|
+
testRunner?: PuppeteerTestRunnerOptions;
|
|
7
10
|
autoFollowNewPage?: boolean;
|
|
8
11
|
newPageTimeout?: number;
|
|
9
12
|
};
|
|
@@ -11,6 +14,8 @@ export type PuppeteerBrowserAgentCreateOpt = PuppeteerBrowserAgentOpt & {
|
|
|
11
14
|
initialPage?: PuppeteerPage;
|
|
12
15
|
};
|
|
13
16
|
export declare class PuppeteerBrowserAgent extends WebAgentCore<PuppeteerWebPage> {
|
|
17
|
+
static getTestRunnerNodeDefinitions(): readonly AgentTestRunnerNodeDefinition[];
|
|
18
|
+
readonly testRunner?: PuppeteerTestRunnerOptions;
|
|
14
19
|
protected readonly pageManager: BrowserPageManager<PuppeteerPage, PuppeteerTarget>;
|
|
15
20
|
constructor(browser: PuppeteerBrowser, initialPage: PuppeteerPage, opts?: PuppeteerBrowserAgentOpt, pageScope?: PuppeteerBrowserPageScope);
|
|
16
21
|
static create(browser: PuppeteerBrowser, opts?: PuppeteerBrowserAgentCreateOpt): Promise<PuppeteerBrowserAgent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-agent.d.ts","sourceRoot":"","sources":["../../../src/puppeteer/browser-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAMhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"browser-agent.d.ts","sourceRoot":"","sources":["../../../src/puppeteer/browser-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAMhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,KAAK,EACV,OAAO,IAAI,gBAAgB,EAC3B,IAAI,IAAI,aAAa,EACrB,MAAM,IAAI,eAAe,EAC1B,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAItE,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,eAAe,EACf,wBAAwB,CACzB,GAAG;IACF,UAAU,CAAC,EAAE,0BAA0B,CAAC;IACxC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,wBAAwB,GAAG;IACtE,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B,CAAC;AAEF,qBAAa,qBAAsB,SAAQ,YAAY,CAAC,gBAAgB,CAAC;WACvD,4BAA4B,IAAI,SAAS,6BAA6B,EAAE;IAOxF,QAAQ,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC;IAEjD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAChD,aAAa,EACb,eAAe,CAChB,CAAC;gBAGA,OAAO,EAAE,gBAAgB,EACzB,WAAW,EAAE,aAAa,EAC1B,IAAI,CAAC,EAAE,wBAAwB,EAC/B,SAAS,CAAC,EAAE,yBAAyB;WAqD1B,MAAM,CACjB,OAAO,EAAE,gBAAgB,EACzB,IAAI,CAAC,EAAE,8BAA8B;IASvC,IAAI,UAAU,kBAEb;IAED,KAAK;IAIC,OAAO;IAIP,aAAa,CAAC,IAAI,EAAE,aAAa;IAIjC,cAAc,CAClB,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,EACzC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAKvB,OAAO;CAId"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PuppeteerPageAgent, PuppeteerAgent } from './page-agent';
|
|
1
|
+
export { PuppeteerPageAgent, PuppeteerAgent, type PuppeteerPageAgentOpt, } from './page-agent';
|
|
2
2
|
export { PuppeteerBrowserAgent, type PuppeteerBrowserAgentCreateOpt, type PuppeteerBrowserAgentOpt, } from './browser-agent';
|
|
3
3
|
export { PuppeteerWebPage } from './page';
|
|
4
4
|
export type { WebPageAgentOpt } from '../web-element';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/puppeteer/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/puppeteer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,KAAK,qBAAqB,GAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,KAAK,8BAA8B,EACnC,KAAK,wBAAwB,GAC9B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { WebAgentCore } from '../common/browser-agent';
|
|
2
2
|
import type { WebPageAgentOpt } from '../web-element';
|
|
3
|
+
import type { AgentTestRunnerNodeDefinition } from '@midscene/core/agent';
|
|
3
4
|
import type { Page as PuppeteerPage } from 'puppeteer';
|
|
4
5
|
import { PuppeteerWebPage } from './page';
|
|
6
|
+
import type { PuppeteerTestRunnerOptions } from './test-runner/types';
|
|
7
|
+
export type PuppeteerPageAgentOpt = WebPageAgentOpt & {
|
|
8
|
+
testRunner?: PuppeteerTestRunnerOptions;
|
|
9
|
+
};
|
|
5
10
|
export declare class PuppeteerPageAgent extends WebAgentCore<PuppeteerWebPage> {
|
|
6
|
-
|
|
11
|
+
static getTestRunnerNodeDefinitions(): readonly AgentTestRunnerNodeDefinition[];
|
|
12
|
+
readonly testRunner?: PuppeteerTestRunnerOptions;
|
|
13
|
+
constructor(page: PuppeteerPage, opts?: PuppeteerPageAgentOpt);
|
|
7
14
|
}
|
|
8
15
|
export { PuppeteerPageAgent as PuppeteerAgent };
|
|
9
16
|
//# sourceMappingURL=page-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-agent.d.ts","sourceRoot":"","sources":["../../../src/puppeteer/page-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"page-agent.d.ts","sourceRoot":"","sources":["../../../src/puppeteer/page-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,KAAK,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAItE,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG;IACpD,UAAU,CAAC,EAAE,0BAA0B,CAAC;CACzC,CAAC;AAEF,qBAAa,kBAAmB,SAAQ,YAAY,CAAC,gBAAgB,CAAC;WACpD,4BAA4B,IAAI,SAAS,6BAA6B,EAAE;IAOxF,QAAQ,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC;gBAErC,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,qBAAqB;CA2B9D;AAED,OAAO,EAAE,kBAAkB,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-nodes.d.ts","sourceRoot":"","sources":["../../../../src/puppeteer/test-runner/agent-nodes.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uCAAuC,2GACY,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WebTestDriverAdapter } from '../../common/test-runner/driver';
|
|
2
|
+
import type { PuppeteerTestRunnerAgent, PuppeteerTestRunnerOptions } from './types';
|
|
3
|
+
export declare const puppeteerTestDriverAdapter: WebTestDriverAdapter<PuppeteerTestRunnerAgent, PuppeteerTestRunnerOptions>;
|
|
4
|
+
//# sourceMappingURL=driver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver.d.ts","sourceRoot":"","sources":["../../../../src/puppeteer/test-runner/driver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,oBAAoB,EACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAoDjB,eAAO,MAAM,0BAA0B,EAAE,oBAAoB,CAC3D,wBAAwB,EACxB,0BAA0B,CAK3B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { clearCookiesInputSchema, gotoUrlInputSchema, setCookiesInputSchema, setViewportSizeInputSchema, } from '../../common/test-runner/nodes';
|
|
2
|
+
export type { ClearCookiesNodeInput, GotoUrlNodeInput, GotoUrlNodeResult, SetCookiesNodeInput, SetCookiesNodeResult, SetViewportSizeNodeInput, } from '../../common/test-runner/nodes';
|
|
3
|
+
export type { PuppeteerCookieProfileContext, PuppeteerNodeContext, PuppeteerTestRunnerAgent, PuppeteerTestRunnerOptions, } from './types';
|
|
4
|
+
export { puppeteerAgentTestRunnerNodeDefinitions } from './agent-nodes';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/puppeteer/test-runner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,6BAA6B,EAC7B,oBAAoB,EACpB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,uCAAuC,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CookieProfileContext, WebNodeContext } from '../../common/test-runner/cookies';
|
|
2
|
+
import type { WebTestRunnerOptions } from '../../common/test-runner/driver';
|
|
3
|
+
import type { CookieParam, Page } from 'puppeteer';
|
|
4
|
+
export type PuppeteerCookie = CookieParam;
|
|
5
|
+
export type PuppeteerNodeContext<TContext> = WebNodeContext<TContext>;
|
|
6
|
+
export type PuppeteerCookieProfileContext<TContext> = CookieProfileContext<TContext>;
|
|
7
|
+
/** Dependencies and source resolvers used by the Puppeteer preset Nodes. */
|
|
8
|
+
export interface PuppeteerTestRunnerOptions extends WebTestRunnerOptions<PuppeteerTestRunnerAgent> {
|
|
9
|
+
getCookieProfile?(input: PuppeteerCookieProfileContext<PuppeteerTestRunnerAgent>): readonly PuppeteerCookie[] | Promise<readonly PuppeteerCookie[]>;
|
|
10
|
+
}
|
|
11
|
+
/** Runtime resources used by Puppeteer Agent Nodes. */
|
|
12
|
+
export interface PuppeteerTestRunnerAgent {
|
|
13
|
+
interface: {
|
|
14
|
+
underlyingPage: Page;
|
|
15
|
+
};
|
|
16
|
+
readonly testRunner?: PuppeteerTestRunnerOptions;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/puppeteer/test-runner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC;AAC1C,MAAM,MAAM,oBAAoB,CAAC,QAAQ,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAC;AACtE,MAAM,MAAM,6BAA6B,CAAC,QAAQ,IAChD,oBAAoB,CAAC,QAAQ,CAAC,CAAC;AAEjC,4EAA4E;AAC5E,MAAM,WAAW,0BACf,SAAQ,oBAAoB,CAAC,wBAAwB,CAAC;IACtD,gBAAgB,CAAC,CACf,KAAK,EAAE,6BAA6B,CAAC,wBAAwB,CAAC,GAC7D,SAAS,eAAe,EAAE,GAAG,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAC;CACrE;AAED,uDAAuD;AACvD,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE;QAAE,cAAc,EAAE,IAAI,CAAA;KAAE,CAAC;IACpC,QAAQ,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/puppeteer/test-runner/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAE/E,eAAO,MAAM,qBAAqB,GAChC,OAAO,OAAO,KACb,wBAeF,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"Browser use",
|
|
9
9
|
"Android use"
|
|
10
10
|
],
|
|
11
|
-
"version": "1.15.
|
|
11
|
+
"version": "1.15.4-beta-20261013083552.0",
|
|
12
12
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
13
13
|
"homepage": "https://midscenejs.com/",
|
|
14
14
|
"main": "./dist/lib/index.js",
|
|
@@ -50,6 +50,11 @@
|
|
|
50
50
|
"require": "./dist/lib/puppeteer/agent-launcher.js",
|
|
51
51
|
"import": "./dist/es/puppeteer/agent-launcher.mjs"
|
|
52
52
|
},
|
|
53
|
+
"./puppeteer/test": {
|
|
54
|
+
"types": "./dist/types/puppeteer/test-runner/index.d.ts",
|
|
55
|
+
"require": "./dist/lib/puppeteer/test-runner/index.js",
|
|
56
|
+
"import": "./dist/es/puppeteer/test-runner/index.mjs"
|
|
57
|
+
},
|
|
53
58
|
"./playwright": {
|
|
54
59
|
"types": "./dist/types/playwright/index.d.ts",
|
|
55
60
|
"require": "./dist/lib/playwright/index.js",
|
|
@@ -117,9 +122,9 @@
|
|
|
117
122
|
"socket.io-client": "4.8.1",
|
|
118
123
|
"ws": "^8.18.1",
|
|
119
124
|
"zod": "^3.25.1",
|
|
120
|
-
"@midscene/
|
|
121
|
-
"@midscene/
|
|
122
|
-
"@midscene/
|
|
125
|
+
"@midscene/playground": "1.15.4-beta-20261013083552.0",
|
|
126
|
+
"@midscene/shared": "1.15.4-beta-20261013083552.0",
|
|
127
|
+
"@midscene/core": "1.15.4-beta-20261013083552.0"
|
|
123
128
|
},
|
|
124
129
|
"devDependencies": {
|
|
125
130
|
"@playwright/test": "^1.45.0",
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
import { requirePlaywrightAgent, throwIfAborted } from "./utils.mjs";
|
|
3
|
-
const clearCookiesInputSchema = z.strictObject({
|
|
4
|
-
name: z.string().regex(/\S/).optional().describe('Cookie name to clear.'),
|
|
5
|
-
domain: z.string().regex(/\S/).optional().describe('Cookie domain to clear.'),
|
|
6
|
-
path: z.string().regex(/\S/).optional().describe('Cookie path to clear.')
|
|
7
|
-
});
|
|
8
|
-
const clearCookiesNode = {
|
|
9
|
-
name: 'clearCookies',
|
|
10
|
-
title: 'Clear browser cookies',
|
|
11
|
-
description: 'Clear all cookies from the current Playwright BrowserContext, or only cookies matching name, domain, or path.',
|
|
12
|
-
stringInputKey: false,
|
|
13
|
-
inputSchema: clearCookiesInputSchema,
|
|
14
|
-
async execute (agent, input, executionContext) {
|
|
15
|
-
const ctx = {
|
|
16
|
-
...executionContext,
|
|
17
|
-
input,
|
|
18
|
-
context: requirePlaywrightAgent(agent)
|
|
19
|
-
};
|
|
20
|
-
throwIfAborted(ctx.signal, 'clearCookies');
|
|
21
|
-
const page = ctx.context.interface.underlyingPage;
|
|
22
|
-
const filters = {
|
|
23
|
-
...void 0 === ctx.input.name ? {} : {
|
|
24
|
-
name: ctx.input.name
|
|
25
|
-
},
|
|
26
|
-
...void 0 === ctx.input.domain ? {} : {
|
|
27
|
-
domain: ctx.input.domain
|
|
28
|
-
},
|
|
29
|
-
...void 0 === ctx.input.path ? {} : {
|
|
30
|
-
path: ctx.input.path
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
await page.context().clearCookies(filters);
|
|
34
|
-
const filterNames = Object.keys(filters);
|
|
35
|
-
return {
|
|
36
|
-
summary: 0 === filterNames.length ? 'Cleared all browser cookies' : `Cleared browser cookies matching ${filterNames.join(', ')}`,
|
|
37
|
-
data: {
|
|
38
|
-
filters
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
export { clearCookiesInputSchema, clearCookiesNode };
|
|
44
|
-
|
|
45
|
-
//# sourceMappingURL=clear-cookies.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"playwright/test-runner/clear-cookies.mjs","sources":["../../../../src/playwright/test-runner/clear-cookies.ts"],"sourcesContent":["import type { AgentTestRunnerNodeDefinition } from '@midscene/core/agent';\nimport type { BrowserContext } from 'playwright';\nimport { z } from 'zod/v4';\nimport { requirePlaywrightAgent, throwIfAborted } from './utils';\n\ntype CookieClearOptions = NonNullable<\n Parameters<BrowserContext['clearCookies']>[0]\n>;\n\n/** Input schema for the Playwright clearCookies Node. */\nexport const clearCookiesInputSchema = z.strictObject({\n name: z.string().regex(/\\S/).optional().describe('Cookie name to clear.'),\n domain: z.string().regex(/\\S/).optional().describe('Cookie domain to clear.'),\n path: z.string().regex(/\\S/).optional().describe('Cookie path to clear.'),\n});\n\n/** Validated input accepted by the Playwright clearCookies Node. */\nexport type ClearCookiesNodeInput = z.infer<typeof clearCookiesInputSchema>;\n\nexport const clearCookiesNode: AgentTestRunnerNodeDefinition<\n z.output<typeof clearCookiesInputSchema>,\n { filters: CookieClearOptions }\n> = {\n name: 'clearCookies',\n title: 'Clear browser cookies',\n description:\n 'Clear all cookies from the current Playwright BrowserContext, or only cookies matching name, domain, or path.',\n stringInputKey: false,\n inputSchema: clearCookiesInputSchema,\n async execute(agent, input, executionContext) {\n const ctx = {\n ...executionContext,\n input,\n context: requirePlaywrightAgent(agent),\n };\n throwIfAborted(ctx.signal, 'clearCookies');\n const page = ctx.context.interface.underlyingPage;\n const filters: CookieClearOptions = {\n ...(ctx.input.name === undefined ? {} : { name: ctx.input.name }),\n ...(ctx.input.domain === undefined ? {} : { domain: ctx.input.domain }),\n ...(ctx.input.path === undefined ? {} : { path: ctx.input.path }),\n };\n await page.context().clearCookies(filters);\n const filterNames = Object.keys(filters);\n return {\n summary:\n filterNames.length === 0\n ? 'Cleared all browser cookies'\n : `Cleared browser cookies matching ${filterNames.join(', ')}`,\n data: { filters },\n };\n },\n};\n"],"names":["clearCookiesInputSchema","z","clearCookiesNode","agent","input","executionContext","ctx","requirePlaywrightAgent","throwIfAborted","page","filters","undefined","filterNames","Object"],"mappings":";;AAUO,MAAMA,0BAA0BC,EAAE,YAAY,CAAC;IACpD,MAAMA,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;IACjD,QAAQA,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;IACnD,MAAMA,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;AACnD;AAKO,MAAMC,mBAGT;IACF,MAAM;IACN,OAAO;IACP,aACE;IACF,gBAAgB;IAChB,aAAaF;IACb,MAAM,SAAQG,KAAK,EAAEC,KAAK,EAAEC,gBAAgB;QAC1C,MAAMC,MAAM;YACV,GAAGD,gBAAgB;YACnBD;YACA,SAASG,uBAAuBJ;QAClC;QACAK,eAAeF,IAAI,MAAM,EAAE;QAC3B,MAAMG,OAAOH,IAAI,OAAO,CAAC,SAAS,CAAC,cAAc;QACjD,MAAMI,UAA8B;YAClC,GAAIJ,AAAmBK,WAAnBL,IAAI,KAAK,CAAC,IAAI,GAAiB,CAAC,IAAI;gBAAE,MAAMA,IAAI,KAAK,CAAC,IAAI;YAAC,CAAC;YAChE,GAAIA,AAAqBK,WAArBL,IAAI,KAAK,CAAC,MAAM,GAAiB,CAAC,IAAI;gBAAE,QAAQA,IAAI,KAAK,CAAC,MAAM;YAAC,CAAC;YACtE,GAAIA,AAAmBK,WAAnBL,IAAI,KAAK,CAAC,IAAI,GAAiB,CAAC,IAAI;gBAAE,MAAMA,IAAI,KAAK,CAAC,IAAI;YAAC,CAAC;QAClE;QACA,MAAMG,KAAK,OAAO,GAAG,YAAY,CAACC;QAClC,MAAME,cAAcC,OAAO,IAAI,CAACH;QAChC,OAAO;YACL,SACEE,AAAuB,MAAvBA,YAAY,MAAM,GACd,gCACA,CAAC,iCAAiC,EAAEA,YAAY,IAAI,CAAC,OAAO;YAClE,MAAM;gBAAEF;YAAQ;QAClB;IACF;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"playwright/test-runner/cookies.mjs","sources":["../../../../src/playwright/test-runner/cookies.ts"],"sourcesContent":["import { readFile } from 'node:fs/promises';\nimport { resolve } from 'node:path';\nimport type { AgentTestRunnerNodeDefinition } from '@midscene/core/agent';\nimport { z } from 'zod/v4';\nimport type {\n PlaywrightCookie,\n PlaywrightNodeContext,\n PlaywrightTestRunnerAgent,\n PlaywrightTestRunnerOptions,\n} from './types';\nimport { requirePlaywrightAgent, resolveWebUrl, throwIfAborted } from './utils';\n\ntype CookieSourceReference =\n | { kind: 'env'; name: string }\n | { kind: 'profile'; name: string }\n | { kind: 'storage-state'; name: string };\n\ninterface ResolvedCookieSource {\n reference: CookieSourceReference;\n cookies: unknown;\n}\n\n/** Input schema for the Playwright setCookies Node. */\nexport const setCookiesInputSchema = z\n .strictObject({\n cookiesEnv: z\n .string()\n .regex(/^[A-Za-z_][A-Za-z0-9_]*$/)\n .optional()\n .describe(\n 'The environment variable containing a Cookie header, cookie array JSON, or Playwright storage-state JSON.',\n ),\n profile: z\n .string()\n .regex(/\\S/)\n .optional()\n .describe('A cookie profile resolved by getCookieProfile().'),\n storageStatePath: z\n .string()\n .regex(/\\S/)\n .optional()\n .describe('A path to a Playwright storage-state JSON file.'),\n url: z\n .string()\n .url()\n .optional()\n .describe(\n 'The HTTP(S) URL used to scope Cookie-header values or cookies without domain/path.',\n ),\n })\n .superRefine((input, ctx) => {\n const sourceCount = [\n input.cookiesEnv,\n input.profile,\n input.storageStatePath,\n ].filter((value) => value !== undefined).length;\n if (sourceCount !== 1) {\n ctx.addIssue({\n code: 'custom',\n message:\n 'exactly one of cookiesEnv, profile, and storageStatePath is required',\n });\n }\n });\n\n/** Validated input accepted by the Playwright setCookies Node. */\nexport type SetCookiesNodeInput = z.infer<typeof setCookiesInputSchema>;\n\n/** Secret-free metadata returned by the Playwright setCookies Node. */\nexport interface SetCookiesNodeResult {\n /** Kind of configured reference used to resolve the cookies. */\n source: CookieSourceReference['kind'];\n /** Environment variable, profile, or storage-state reference name. */\n sourceName: string;\n /** Number of cookies passed to the BrowserContext. */\n count: number;\n}\n\nconst toCookieSourceReference = (\n input: SetCookiesNodeInput,\n): CookieSourceReference => {\n if (input.cookiesEnv !== undefined) {\n return { kind: 'env', name: input.cookiesEnv };\n }\n if (input.profile !== undefined) {\n return { kind: 'profile', name: input.profile };\n }\n if (input.storageStatePath !== undefined) {\n return { kind: 'storage-state', name: input.storageStatePath };\n }\n throw new TypeError('setCookies requires one cookie source.');\n};\n\nconst parseCookieHeader = (raw: string, url: string | undefined) => {\n if (url === undefined) {\n throw new TypeError(\n 'setCookies.url is required when cookiesEnv contains a Cookie header.',\n );\n }\n const segments = raw\n .split(';')\n .map((segment) => segment.trim())\n .filter(Boolean);\n if (segments.length === 0) {\n throw new TypeError('setCookies Cookie header contains no cookies.');\n }\n return segments.map((segment) => {\n const separator = segment.indexOf('=');\n if (separator <= 0) {\n throw new TypeError(\n 'setCookies Cookie header contains an invalid name/value pair.',\n );\n }\n const name = segment.slice(0, separator).trim();\n const value = segment.slice(separator + 1).trim();\n if (!name) {\n throw new TypeError('setCookies Cookie header contains an empty name.');\n }\n return { name, value, url } satisfies PlaywrightCookie;\n });\n};\n\nconst parseCookieJson = (raw: string): unknown => {\n try {\n return JSON.parse(raw);\n } catch {\n throw new TypeError(\n 'setCookies source must contain valid JSON or a Cookie header.',\n );\n }\n};\n\nconst resolveCookieSource = async (\n reference: CookieSourceReference,\n defaultUrl: string | undefined,\n ctx: PlaywrightNodeContext<PlaywrightTestRunnerAgent>,\n options: PlaywrightTestRunnerOptions,\n): Promise<ResolvedCookieSource> => {\n switch (reference.kind) {\n case 'env': {\n let env: Readonly<Record<string, string | undefined>>;\n try {\n env = (await options.getEnv?.(ctx)) ?? process.env;\n } catch {\n throw new Error(\n `Failed to resolve cookie environment ${reference.name}; the original error was redacted because it may contain cookie values.`,\n );\n }\n const raw = env[reference.name];\n if (!raw?.trim()) {\n throw new Error(\n `Environment variable ${reference.name} is missing or blank.`,\n );\n }\n const trimmed = raw.trim();\n return {\n reference,\n cookies: /^[\\[{]/.test(trimmed)\n ? parseCookieJson(trimmed)\n : parseCookieHeader(trimmed, defaultUrl),\n };\n }\n case 'profile': {\n if (!options.getCookieProfile) {\n throw new Error(\n 'setCookies.profile requires a configured getCookieProfile callback.',\n );\n }\n try {\n return {\n reference,\n cookies: await options.getCookieProfile({\n profile: reference.name,\n context: ctx.context,\n signal: ctx.signal,\n }),\n };\n } catch {\n throw new Error(\n `Failed to resolve cookie profile ${reference.name}; the original error was redacted because it may contain cookie values.`,\n );\n }\n }\n case 'storage-state': {\n const path = options.resolveStorageStatePath\n ? await options.resolveStorageStatePath(reference.name, ctx)\n : resolve(process.cwd(), reference.name);\n return {\n reference,\n cookies: parseCookieJson(await readFile(path, 'utf8')),\n };\n }\n }\n};\n\nconst normalizeCookie = (\n candidate: unknown,\n defaultUrl: string | undefined,\n index: number,\n): PlaywrightCookie => {\n if (!candidate || typeof candidate !== 'object' || Array.isArray(candidate)) {\n throw new TypeError(\n `setCookies cookie at index ${index} must be an object.`,\n );\n }\n const cookie = candidate as Record<string, unknown>;\n if (typeof cookie.name !== 'string' || !cookie.name.trim()) {\n throw new TypeError(\n `setCookies cookie at index ${index} requires a non-blank name.`,\n );\n }\n if (typeof cookie.value !== 'string') {\n throw new TypeError(\n `setCookies cookie at index ${index} requires a string value.`,\n );\n }\n\n const normalized = { ...cookie } as unknown as PlaywrightCookie;\n const hasUrl = typeof cookie.url === 'string' && cookie.url.length > 0;\n const hasDomain =\n typeof cookie.domain === 'string' && cookie.domain.length > 0;\n if (!hasUrl && !hasDomain) {\n if (defaultUrl === undefined) {\n throw new TypeError(\n `setCookies cookie at index ${index} requires url or domain, or setCookies.url must be provided.`,\n );\n }\n normalized.url = defaultUrl;\n }\n if (hasDomain && typeof cookie.path !== 'string') {\n normalized.path = '/';\n }\n return normalized;\n};\n\nconst normalizeCookies = (\n source: unknown,\n defaultUrl: string | undefined,\n): PlaywrightCookie[] => {\n const candidates = Array.isArray(source)\n ? source\n : source &&\n typeof source === 'object' &&\n Array.isArray((source as { cookies?: unknown }).cookies)\n ? (source as { cookies: unknown[] }).cookies\n : undefined;\n if (!candidates) {\n throw new TypeError(\n 'setCookies JSON must be a cookie array or an object with a cookies array.',\n );\n }\n if (candidates.length === 0) {\n throw new TypeError('setCookies source contains no cookies.');\n }\n return candidates.map((cookie, index) =>\n normalizeCookie(cookie, defaultUrl, index),\n );\n};\n\nexport const setCookiesNode: AgentTestRunnerNodeDefinition<\n z.output<typeof setCookiesInputSchema>,\n SetCookiesNodeResult\n> = {\n name: 'setCookies',\n title: 'Set browser cookies',\n description:\n 'Load cookies from an environment variable, configured profile, or Playwright storage-state file without persisting cookie values in workflow input or output.',\n stringInputKey: false,\n inputSchema: setCookiesInputSchema,\n async execute(agent, input, executionContext) {\n const ctx = {\n ...executionContext,\n input,\n context: requirePlaywrightAgent(agent),\n };\n throwIfAborted(ctx.signal, 'setCookies');\n const page = ctx.context.interface.underlyingPage;\n const defaultUrl =\n ctx.input.url === undefined\n ? undefined\n : resolveWebUrl(ctx.input.url, undefined, 'setCookies.url');\n const reference = toCookieSourceReference(ctx.input);\n const resolved = await resolveCookieSource(\n reference,\n defaultUrl,\n ctx,\n ctx.context.testRunner ?? {},\n );\n const cookies = normalizeCookies(resolved.cookies, defaultUrl);\n\n throwIfAborted(ctx.signal, 'setCookies');\n try {\n await page.context().addCookies(cookies);\n } catch {\n throw new Error(\n `Failed to set ${cookies.length} browser cookie(s); the browser error was redacted because it may contain cookie values.`,\n );\n }\n\n const result: SetCookiesNodeResult = {\n source: resolved.reference.kind,\n sourceName: resolved.reference.name,\n count: cookies.length,\n };\n return {\n summary: `Set ${result.count} browser cookie(s) from ${result.source} source ${result.sourceName}`,\n data: result,\n };\n },\n};\n"],"names":["setCookiesInputSchema","z","input","ctx","sourceCount","value","undefined","toCookieSourceReference","TypeError","parseCookieHeader","raw","url","segments","segment","Boolean","separator","name","parseCookieJson","JSON","resolveCookieSource","reference","defaultUrl","options","env","process","Error","trimmed","path","resolve","readFile","normalizeCookie","candidate","index","Array","cookie","normalized","hasUrl","hasDomain","normalizeCookies","source","candidates","setCookiesNode","agent","executionContext","requirePlaywrightAgent","throwIfAborted","page","resolveWebUrl","resolved","cookies","result"],"mappings":";;;;AAuBO,MAAMA,wBAAwBC,EAAAA,YACtB,CAAC;IACZ,YAAYA,EAAAA,MACH,GACN,KAAK,CAAC,4BACN,QAAQ,GACR,QAAQ,CACP;IAEJ,SA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B,YAAYA,SAAS,SAAS,CAAC,IAAI;YACnC,OAAOC,QAAQ,MAAM;QACvB;QACA,OAAO;YACL,SAAS,CAAC,IAAI,EAAEC,OAAO,KAAK,CAAC,wBAAwB,EAAEA,OAAO,MAAM,CAAC,QAAQ,EAAEA,OAAO,UAAU,EAAE;YAClG,MAAMA;QACR;IACF;AACF"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
import { requirePlaywrightAgent, resolveWebUrl, throwIfAborted } from "./utils.mjs";
|
|
3
|
-
const DEFAULT_NAVIGATION_TIMEOUT_MS = 60000;
|
|
4
|
-
const DEFAULT_WAIT_UNTIL = 'domcontentloaded';
|
|
5
|
-
const gotoUrlInputSchema = z.strictObject({
|
|
6
|
-
url: z.string().min(1).describe('An absolute HTTP(S) URL or a path relative to Playwright baseURL or the current page URL.'),
|
|
7
|
-
waitUntil: z["enum"]([
|
|
8
|
-
'commit',
|
|
9
|
-
'domcontentloaded',
|
|
10
|
-
'load',
|
|
11
|
-
'networkidle'
|
|
12
|
-
]).default(DEFAULT_WAIT_UNTIL).describe('The Playwright navigation lifecycle event to wait for.'),
|
|
13
|
-
timeoutMs: z.number().positive().default(DEFAULT_NAVIGATION_TIMEOUT_MS).describe('The navigation timeout in milliseconds.')
|
|
14
|
-
});
|
|
15
|
-
const resolveNavigationUrl = (target, page)=>{
|
|
16
|
-
const trimmed = target.trim();
|
|
17
|
-
if (!trimmed) throw new TypeError('gotoUrl.url must not be blank.');
|
|
18
|
-
if (/^[a-z][a-z\d+.-]*:/i.test(trimmed)) return resolveWebUrl(trimmed, void 0, 'gotoUrl.url');
|
|
19
|
-
const context = page.context();
|
|
20
|
-
const configuredBase = context._options?.baseURL;
|
|
21
|
-
if (void 0 !== configuredBase) return resolveWebUrl(trimmed, configuredBase, 'gotoUrl.url');
|
|
22
|
-
const currentUrl = page.url();
|
|
23
|
-
if (!/^https?:\/\//i.test(currentUrl)) throw new TypeError(`gotoUrl.url cannot resolve a relative URL from ${JSON.stringify(currentUrl)}. Use an absolute HTTP(S) URL for the first navigation or configure Playwright baseURL.`);
|
|
24
|
-
return resolveWebUrl(trimmed, currentUrl, 'gotoUrl.url');
|
|
25
|
-
};
|
|
26
|
-
const gotoUrlNode = {
|
|
27
|
-
name: 'gotoUrl',
|
|
28
|
-
title: 'Open a Web URL',
|
|
29
|
-
description: 'Navigate the current Playwright Page to an absolute HTTP(S) URL or a path relative to Playwright baseURL or the current page URL.',
|
|
30
|
-
stringInputKey: 'url',
|
|
31
|
-
inputSchema: gotoUrlInputSchema,
|
|
32
|
-
async execute (agent, input, executionContext) {
|
|
33
|
-
const ctx = {
|
|
34
|
-
...executionContext,
|
|
35
|
-
input,
|
|
36
|
-
context: requirePlaywrightAgent(agent)
|
|
37
|
-
};
|
|
38
|
-
throwIfAborted(ctx.signal, 'gotoUrl');
|
|
39
|
-
const page = ctx.context.interface.underlyingPage;
|
|
40
|
-
const url = resolveNavigationUrl(ctx.input.url, page);
|
|
41
|
-
const response = await page.goto(url, {
|
|
42
|
-
waitUntil: ctx.input.waitUntil,
|
|
43
|
-
timeout: ctx.input.timeoutMs
|
|
44
|
-
});
|
|
45
|
-
throwIfAborted(ctx.signal, 'gotoUrl');
|
|
46
|
-
const status = response?.status() ?? null;
|
|
47
|
-
const result = {
|
|
48
|
-
url: page.url(),
|
|
49
|
-
status,
|
|
50
|
-
title: await page.title()
|
|
51
|
-
};
|
|
52
|
-
return {
|
|
53
|
-
summary: `Navigated to ${result.url}`,
|
|
54
|
-
data: result
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
export { gotoUrlInputSchema, gotoUrlNode };
|
|
59
|
-
|
|
60
|
-
//# sourceMappingURL=goto-url.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"playwright/test-runner/goto-url.mjs","sources":["../../../../src/playwright/test-runner/goto-url.ts"],"sourcesContent":["import type { AgentTestRunnerNodeDefinition } from '@midscene/core/agent';\nimport type { BrowserContext, Page } from 'playwright';\nimport { z } from 'zod/v4';\nimport { requirePlaywrightAgent, resolveWebUrl, throwIfAborted } from './utils';\n\nconst DEFAULT_NAVIGATION_TIMEOUT_MS = 60_000;\nconst DEFAULT_WAIT_UNTIL = 'domcontentloaded' as const;\n\n/** Input schema for the Playwright gotoUrl Node. */\nexport const gotoUrlInputSchema = z.strictObject({\n url: z\n .string()\n .min(1)\n .describe(\n 'An absolute HTTP(S) URL or a path relative to Playwright baseURL or the current page URL.',\n ),\n waitUntil: z\n .enum(['commit', 'domcontentloaded', 'load', 'networkidle'])\n .default(DEFAULT_WAIT_UNTIL)\n .describe('The Playwright navigation lifecycle event to wait for.'),\n timeoutMs: z\n .number()\n .positive()\n .default(DEFAULT_NAVIGATION_TIMEOUT_MS)\n .describe('The navigation timeout in milliseconds.'),\n});\n\n/** Validated input accepted by the Playwright gotoUrl Node. */\nexport type GotoUrlNodeInput = z.infer<typeof gotoUrlInputSchema>;\n\n/** Structured navigation details returned by the Playwright gotoUrl Node. */\nexport interface GotoUrlNodeResult {\n /** Final Page URL after navigation and redirects. */\n url: string;\n /** Main-resource HTTP status, or null when Playwright returns no response. */\n status: number | null;\n /** Document title after navigation completes. */\n title: string;\n}\n\nconst resolveNavigationUrl = (target: string, page: Page): string => {\n const trimmed = target.trim();\n if (!trimmed) throw new TypeError('gotoUrl.url must not be blank.');\n // Absolute URLs do not depend on either configured or current-page bases.\n if (/^[a-z][a-z\\d+.-]*:/i.test(trimmed)) {\n return resolveWebUrl(trimmed, undefined, 'gotoUrl.url');\n }\n\n // Playwright has no public baseURL getter. Its BrowserContext stores the\n // configured value in _options; keep this internal access localized here.\n const context = page.context() as BrowserContext & {\n _options?: { baseURL?: string };\n };\n const configuredBase = context._options?.baseURL;\n if (configuredBase !== undefined) {\n return resolveWebUrl(trimmed, configuredBase, 'gotoUrl.url');\n }\n\n const currentUrl = page.url();\n if (!/^https?:\\/\\//i.test(currentUrl)) {\n throw new TypeError(\n `gotoUrl.url cannot resolve a relative URL from ${JSON.stringify(currentUrl)}. Use an absolute HTTP(S) URL for the first navigation or configure Playwright baseURL.`,\n );\n }\n return resolveWebUrl(trimmed, currentUrl, 'gotoUrl.url');\n};\n\nexport const gotoUrlNode: AgentTestRunnerNodeDefinition<\n z.output<typeof gotoUrlInputSchema>,\n GotoUrlNodeResult\n> = {\n name: 'gotoUrl',\n title: 'Open a Web URL',\n description:\n 'Navigate the current Playwright Page to an absolute HTTP(S) URL or a path relative to Playwright baseURL or the current page URL.',\n stringInputKey: 'url',\n inputSchema: gotoUrlInputSchema,\n async execute(agent, input, executionContext) {\n const ctx = {\n ...executionContext,\n input,\n context: requirePlaywrightAgent(agent),\n };\n throwIfAborted(ctx.signal, 'gotoUrl');\n const page = ctx.context.interface.underlyingPage;\n const url = resolveNavigationUrl(ctx.input.url, page);\n const response = await page.goto(url, {\n waitUntil: ctx.input.waitUntil,\n timeout: ctx.input.timeoutMs,\n });\n throwIfAborted(ctx.signal, 'gotoUrl');\n const status = response?.status() ?? null;\n const result = {\n url: page.url(),\n status,\n title: await page.title(),\n };\n return { summary: `Navigated to ${result.url}`, data: result };\n },\n};\n"],"names":["DEFAULT_NAVIGATION_TIMEOUT_MS","DEFAULT_WAIT_UNTIL","gotoUrlInputSchema","z","resolveNavigationUrl","target","page","trimmed","TypeError","resolveWebUrl","undefined","context","configuredBase","currentUrl","JSON","gotoUrlNode","agent","input","executionContext","ctx","requirePlaywrightAgent","throwIfAborted","url","response","status","result"],"mappings":";;AAKA,MAAMA,gCAAgC;AACtC,MAAMC,qBAAqB;AAGpB,MAAMC,qBAAqBC,EAAE,YAAY,CAAC;IAC/C,KAAKA,EAAAA,MACI,GACN,GAAG,CAAC,GACJ,QAAQ,CACP;IAEJ,WAAWA,CAAC,CAADA,OACJ,CAAC;QAAC;QAAU;QAAoB;QAAQ;KAAc,EAC1D,OAAO,CAACF,oBACR,QAAQ,CAAC;IACZ,WAAWE,EAAAA,MACF,G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E,SAAS,CAAC,aAAa,EAAEmB,OAAO,GAAG,EAAE;YAAE,MAAMA;QAAO;IAC/D;AACF"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
import { requirePlaywrightAgent, throwIfAborted } from "./utils.mjs";
|
|
3
|
-
const setViewportSizeInputSchema = z.strictObject({
|
|
4
|
-
width: z.number().int().positive().describe('Viewport width in CSS pixels.'),
|
|
5
|
-
height: z.number().int().positive().describe('Viewport height in CSS pixels.')
|
|
6
|
-
});
|
|
7
|
-
const setViewportSizeNode = {
|
|
8
|
-
name: 'setViewportSize',
|
|
9
|
-
title: 'Set the browser viewport size',
|
|
10
|
-
description: 'Set the current Playwright Page viewport size in CSS pixels and return the effective size.',
|
|
11
|
-
stringInputKey: false,
|
|
12
|
-
inputSchema: setViewportSizeInputSchema,
|
|
13
|
-
async execute (agent, input, executionContext) {
|
|
14
|
-
const ctx = {
|
|
15
|
-
...executionContext,
|
|
16
|
-
input,
|
|
17
|
-
context: requirePlaywrightAgent(agent)
|
|
18
|
-
};
|
|
19
|
-
throwIfAborted(ctx.signal, 'setViewportSize');
|
|
20
|
-
const page = ctx.context.interface.underlyingPage;
|
|
21
|
-
await page.setViewportSize({
|
|
22
|
-
width: ctx.input.width,
|
|
23
|
-
height: ctx.input.height
|
|
24
|
-
});
|
|
25
|
-
const viewport = page.viewportSize();
|
|
26
|
-
if (!viewport) throw new Error('Playwright did not report an effective viewport size.');
|
|
27
|
-
return {
|
|
28
|
-
summary: `Set viewport to ${viewport.width}x${viewport.height}`,
|
|
29
|
-
data: viewport
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export { setViewportSizeInputSchema, setViewportSizeNode };
|
|
34
|
-
|
|
35
|
-
//# sourceMappingURL=viewport.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"playwright/test-runner/viewport.mjs","sources":["../../../../src/playwright/test-runner/viewport.ts"],"sourcesContent":["import type { AgentTestRunnerNodeDefinition } from '@midscene/core/agent';\nimport { z } from 'zod/v4';\nimport { requirePlaywrightAgent, throwIfAborted } from './utils';\n\n/** Input schema for the Playwright setViewportSize Node. */\nexport const setViewportSizeInputSchema = z.strictObject({\n width: z.number().int().positive().describe('Viewport width in CSS pixels.'),\n height: z\n .number()\n .int()\n .positive()\n .describe('Viewport height in CSS pixels.'),\n});\n\n/** Validated input accepted by the Playwright setViewportSize Node. */\nexport type SetViewportSizeNodeInput = z.infer<\n typeof setViewportSizeInputSchema\n>;\n\nexport const setViewportSizeNode: AgentTestRunnerNodeDefinition<\n z.output<typeof setViewportSizeInputSchema>,\n { width: number; height: number }\n> = {\n name: 'setViewportSize',\n title: 'Set the browser viewport size',\n description:\n 'Set the current Playwright Page viewport size in CSS pixels and return the effective size.',\n stringInputKey: false,\n inputSchema: setViewportSizeInputSchema,\n async execute(agent, input, executionContext) {\n const ctx = {\n ...executionContext,\n input,\n context: requirePlaywrightAgent(agent),\n };\n throwIfAborted(ctx.signal, 'setViewportSize');\n const page = ctx.context.interface.underlyingPage;\n await page.setViewportSize({\n width: ctx.input.width,\n height: ctx.input.height,\n });\n const viewport = page.viewportSize();\n if (!viewport) {\n throw new Error('Playwright did not report an effective viewport size.');\n }\n return {\n summary: `Set viewport to ${viewport.width}x${viewport.height}`,\n data: viewport,\n };\n },\n};\n"],"names":["setViewportSizeInputSchema","z","setViewportSizeNode","agent","input","executionContext","ctx","requirePlaywrightAgent","throwIfAborted","page","viewport","Error"],"mappings":";;AAKO,MAAMA,6BAA6BC,EAAE,YAAY,CAAC;IACvD,OAAOA,EAAE,MAAM,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC5C,QAAQA,EAAAA,MACC,GACN,GAAG,GACH,QAAQ,GACR,QAAQ,CAAC;AACd;AAOO,MAAMC,sBAGT;IACF,MAAM;IACN,OAAO;IACP,aACE;IACF,gBAAgB;IAChB,aAAaF;IACb,MAAM,SAAQG,KAAK,EAAEC,KAAK,EAAEC,gBAAgB;QAC1C,MAAMC,MAAM;YACV,GAAGD,gBAAgB;YACnBD;YACA,SAASG,uBAAuBJ;QAClC;QACAK,eAAeF,IAAI,MAAM,EAAE;QAC3B,MAAMG,OAAOH,IAAI,OAAO,CAAC,SAAS,CAAC,cAAc;QACjD,MAAMG,KAAK,eAAe,CAAC;YACzB,OAAOH,IAAI,KAAK,CAAC,KAAK;YACtB,QAAQA,IAAI,KAAK,CAAC,MAAM;QAC1B;QACA,MAAMI,WAAWD,KAAK,YAAY;QAClC,IAAI,CAACC,UACH,MAAM,IAAIC,MAAM;QAElB,OAAO;YACL,SAAS,CAAC,gBAAgB,EAAED,SAAS,KAAK,CAAC,CAAC,EAAEA,SAAS,MAAM,EAAE;YAC/D,MAAMA;QACR;IACF;AACF"}
|