@midscene/web 0.3.2 → 0.3.3
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/debug.js +559 -0
- package/dist/es/index.js +3 -3
- package/dist/es/playwright.js +1245 -0
- package/dist/es/puppeteer.js +1049 -0
- package/dist/lib/debug.js +563 -0
- package/dist/lib/index.js +3 -3
- package/dist/lib/playwright.js +1245 -0
- package/dist/lib/puppeteer.js +1053 -0
- package/dist/types/debug.d.ts +17 -0
- package/dist/types/index.d.ts +11 -191
- package/dist/types/page.d-70ed000f.d.ts +6 -0
- package/dist/types/playwright.d.ts +36 -0
- package/dist/types/puppeteer.d.ts +33 -0
- package/dist/types/tasks-75eae15e.d.ts +125 -0
- package/package.json +26 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { writeFileSync } from 'node:fs';
|
|
2
|
+
import { W as WebPage } from './page.d-70ed000f.js';
|
|
3
|
+
import 'playwright';
|
|
4
|
+
import 'puppeteer';
|
|
5
|
+
|
|
6
|
+
declare function generateExtractData(page: WebPage, targetDir: string, saveImgType?: {
|
|
7
|
+
disableInputImage: boolean;
|
|
8
|
+
disableOutputImage: boolean;
|
|
9
|
+
disableOutputWithoutTextImg: boolean;
|
|
10
|
+
disableResizeOutputImg: boolean;
|
|
11
|
+
disableSnapshot: boolean;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
declare function generateTestDataPath(testDataName: string): string;
|
|
14
|
+
type WriteFileSyncParams = Parameters<typeof writeFileSync>;
|
|
15
|
+
declare function writeFileSyncWithDir(filePath: string, content: WriteFileSyncParams[1], options?: WriteFileSyncParams[2]): void;
|
|
16
|
+
|
|
17
|
+
export { generateExtractData, generateTestDataPath, writeFileSyncWithDir };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,191 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
IMG = "IMG Node",
|
|
13
|
-
TEXT = "TEXT Node"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare class WebElementInfo implements BaseElement {
|
|
17
|
-
content: string;
|
|
18
|
-
locator: string;
|
|
19
|
-
rect: Rect;
|
|
20
|
-
center: [number, number];
|
|
21
|
-
page: WebPage;
|
|
22
|
-
id: string;
|
|
23
|
-
attributes: {
|
|
24
|
-
nodeType: NodeType;
|
|
25
|
-
[key: string]: string;
|
|
26
|
-
};
|
|
27
|
-
constructor({ content, rect, page, locator, id, attributes, }: {
|
|
28
|
-
content: string;
|
|
29
|
-
rect: Rect;
|
|
30
|
-
page: WebPage;
|
|
31
|
-
locator: string;
|
|
32
|
-
id: string;
|
|
33
|
-
attributes: {
|
|
34
|
-
nodeType: NodeType;
|
|
35
|
-
[key: string]: string;
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
type WebUIContext = UIContext<WebElementInfo> & {
|
|
41
|
-
url: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
type PlanTask = {
|
|
45
|
-
type: 'plan';
|
|
46
|
-
prompt: string;
|
|
47
|
-
pageContext: {
|
|
48
|
-
url: string;
|
|
49
|
-
size: {
|
|
50
|
-
width: number;
|
|
51
|
-
height: number;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
response: {
|
|
55
|
-
plans: PlanningAction[];
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
type LocateTask = {
|
|
59
|
-
type: 'locate';
|
|
60
|
-
prompt: string;
|
|
61
|
-
pageContext: {
|
|
62
|
-
url: string;
|
|
63
|
-
size: {
|
|
64
|
-
width: number;
|
|
65
|
-
height: number;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
response: AIElementParseResponse;
|
|
69
|
-
};
|
|
70
|
-
type AiTasks = Array<PlanTask | LocateTask>;
|
|
71
|
-
type AiTaskCache = {
|
|
72
|
-
aiTasks: AiTasks;
|
|
73
|
-
};
|
|
74
|
-
declare class TaskCache {
|
|
75
|
-
cache: AiTaskCache | undefined;
|
|
76
|
-
newCache: AiTaskCache;
|
|
77
|
-
constructor(opts?: {
|
|
78
|
-
cache: AiTaskCache;
|
|
79
|
-
});
|
|
80
|
-
/**
|
|
81
|
-
* Read and return cached responses asynchronously based on specific criteria
|
|
82
|
-
* This function is mainly used to read cached responses from a certain storage medium.
|
|
83
|
-
* It accepts three parameters: the page context information, the task type, and the user's prompt information.
|
|
84
|
-
* In the function, it first checks whether there is cached data. If there is, it retrieves the first task response from the cache.
|
|
85
|
-
* It then checks whether the task type is 'locate' and whether the corresponding element can be found in the new context.
|
|
86
|
-
* If the element cannot be found, it returns false, indicating that the cache is invalid.
|
|
87
|
-
* If the task type is correct and the user prompt matches, it checks whether the page context is the same.
|
|
88
|
-
* If the page context is the same, it returns the cached response, indicating that the cache hit is successful.
|
|
89
|
-
* If there is no cached data or the conditions are not met, the function returns false, indicating that no cache is available or the cache is not hit.
|
|
90
|
-
*
|
|
91
|
-
* @param pageContext UIContext<WebElementInfo> type, representing the context information of the current page
|
|
92
|
-
* @param type String type, specifying the task type, can be 'plan' or 'locate'
|
|
93
|
-
* @param userPrompt String type, representing user prompt information
|
|
94
|
-
* @return Returns a Promise object that resolves to a boolean or object
|
|
95
|
-
*/
|
|
96
|
-
readCache(pageContext: WebUIContext, type: 'plan', userPrompt: string): PlanTask['response'];
|
|
97
|
-
readCache(pageContext: WebUIContext, type: 'locate', userPrompt: string): LocateTask['response'];
|
|
98
|
-
saveCache(cache: PlanTask | LocateTask): void;
|
|
99
|
-
pageContextEqual(taskPageContext: LocateTask['pageContext'], pageContext: WebUIContext): boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Generate task cache data.
|
|
102
|
-
* This method is mainly used to create or obtain some cached data for tasks, and it returns a new cache object.
|
|
103
|
-
* In the cache object, it may contain task-related information, states, or other necessary data.
|
|
104
|
-
* It is assumed that the `newCache` property already exists in the current class or object and is a data structure used to store task cache.
|
|
105
|
-
* @returns {Object} Returns a new cache object, which may include task cache data.
|
|
106
|
-
*/
|
|
107
|
-
generateTaskCache(): AiTaskCache;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
interface ExecutionResult<OutputType = any> {
|
|
111
|
-
output: OutputType;
|
|
112
|
-
executor: Executor;
|
|
113
|
-
}
|
|
114
|
-
declare class PageTaskExecutor {
|
|
115
|
-
page: WebPage;
|
|
116
|
-
insight: Insight<WebElementInfo, WebUIContext>;
|
|
117
|
-
taskCache: TaskCache;
|
|
118
|
-
constructor(page: WebPage, opts: {
|
|
119
|
-
cache: AiTaskCache;
|
|
120
|
-
});
|
|
121
|
-
private recordScreenshot;
|
|
122
|
-
private wrapExecutorWithScreenshot;
|
|
123
|
-
private convertPlanToExecutable;
|
|
124
|
-
action(userPrompt: string): Promise<ExecutionResult>;
|
|
125
|
-
query(demand: InsightExtractParam): Promise<ExecutionResult>;
|
|
126
|
-
assert(assertion: string): Promise<ExecutionResult<InsightAssertionResponse>>;
|
|
127
|
-
waitFor(assertion: string, opt: PlanningActionParamWaitFor): Promise<ExecutionResult<void>>;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
declare const PlaywrightAiFixture: () => {
|
|
131
|
-
ai: ({ page }: {
|
|
132
|
-
page: Page;
|
|
133
|
-
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
134
|
-
aiAction: ({ page }: {
|
|
135
|
-
page: Page;
|
|
136
|
-
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
137
|
-
aiQuery: ({ page }: {
|
|
138
|
-
page: Page;
|
|
139
|
-
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
140
|
-
aiAssert: ({ page }: {
|
|
141
|
-
page: Page;
|
|
142
|
-
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
143
|
-
aiWaitFor: ({ page }: {
|
|
144
|
-
page: Page;
|
|
145
|
-
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
146
|
-
};
|
|
147
|
-
type PlayWrightAiFixtureType = {
|
|
148
|
-
ai: <T = any>(prompt: string, opts?: {
|
|
149
|
-
type?: 'action' | 'query';
|
|
150
|
-
}) => Promise<T>;
|
|
151
|
-
aiAction: (taskPrompt: string) => ReturnType<PageTaskExecutor['action']>;
|
|
152
|
-
aiQuery: <T = any>(demand: any) => Promise<T>;
|
|
153
|
-
aiAssert: (assertion: string, errorMsg?: string) => Promise<void>;
|
|
154
|
-
aiWaitFor: (assertion: string, opt?: AgentWaitForOpt) => Promise<void>;
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
interface PageAgentOpt {
|
|
158
|
-
testId?: string;
|
|
159
|
-
groupName?: string;
|
|
160
|
-
groupDescription?: string;
|
|
161
|
-
cache?: AiTaskCache;
|
|
162
|
-
generateReport?: boolean;
|
|
163
|
-
autoPrintReportMsg?: boolean;
|
|
164
|
-
}
|
|
165
|
-
declare class PageAgent {
|
|
166
|
-
page: WebPage;
|
|
167
|
-
dump: GroupedActionDump;
|
|
168
|
-
reportFile?: string;
|
|
169
|
-
reportFileName?: string;
|
|
170
|
-
taskExecutor: PageTaskExecutor;
|
|
171
|
-
opts: PageAgentOpt;
|
|
172
|
-
constructor(page: WebPage, opts?: PageAgentOpt);
|
|
173
|
-
appendExecutionDump(execution: ExecutionDump): void;
|
|
174
|
-
dumpDataString(): string;
|
|
175
|
-
writeOutActionDumps(): void;
|
|
176
|
-
aiAction(taskPrompt: string): Promise<void>;
|
|
177
|
-
aiQuery(demand: any): Promise<any>;
|
|
178
|
-
aiAssert(assertion: string, msg?: string): Promise<void>;
|
|
179
|
-
aiWaitFor(assertion: string, opt?: AgentWaitForOpt$1): Promise<void>;
|
|
180
|
-
ai(taskPrompt: string, type?: string): Promise<any>;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
declare function generateExtractData(page: WebPage, targetDir: string, saveImgType?: {
|
|
184
|
-
disableInputImage: boolean;
|
|
185
|
-
disableOutputImage: boolean;
|
|
186
|
-
disableOutputWithoutTextImg: boolean;
|
|
187
|
-
disableResizeOutputImg: boolean;
|
|
188
|
-
disableSnapshot: boolean;
|
|
189
|
-
}): Promise<void>;
|
|
190
|
-
|
|
191
|
-
export { type PlayWrightAiFixtureType, PlaywrightAiFixture, PageAgent as PuppeteerAgent, generateExtractData };
|
|
1
|
+
export { PlayWrightAiFixtureType, PlaywrightAiFixture } from './playwright.js';
|
|
2
|
+
export { PuppeteerAgent } from './puppeteer.js';
|
|
3
|
+
export { generateExtractData } from './debug.js';
|
|
4
|
+
import '@midscene/core/.';
|
|
5
|
+
import '@playwright/test';
|
|
6
|
+
import 'playwright';
|
|
7
|
+
import './tasks-75eae15e.js';
|
|
8
|
+
import './page.d-70ed000f.js';
|
|
9
|
+
import 'puppeteer';
|
|
10
|
+
import '@midscene/core';
|
|
11
|
+
import 'node:fs';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AgentWaitForOpt } from '@midscene/core/.';
|
|
2
|
+
import { TestInfo } from '@playwright/test';
|
|
3
|
+
import { Page } from 'playwright';
|
|
4
|
+
import { P as PageTaskExecutor } from './tasks-75eae15e.js';
|
|
5
|
+
import './page.d-70ed000f.js';
|
|
6
|
+
import 'puppeteer';
|
|
7
|
+
import '@midscene/core';
|
|
8
|
+
|
|
9
|
+
declare const PlaywrightAiFixture: () => {
|
|
10
|
+
ai: ({ page }: {
|
|
11
|
+
page: Page;
|
|
12
|
+
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
13
|
+
aiAction: ({ page }: {
|
|
14
|
+
page: Page;
|
|
15
|
+
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
16
|
+
aiQuery: ({ page }: {
|
|
17
|
+
page: Page;
|
|
18
|
+
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
19
|
+
aiAssert: ({ page }: {
|
|
20
|
+
page: Page;
|
|
21
|
+
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
22
|
+
aiWaitFor: ({ page }: {
|
|
23
|
+
page: Page;
|
|
24
|
+
}, use: any, testInfo: TestInfo) => Promise<void>;
|
|
25
|
+
};
|
|
26
|
+
type PlayWrightAiFixtureType = {
|
|
27
|
+
ai: <T = any>(prompt: string, opts?: {
|
|
28
|
+
type?: 'action' | 'query';
|
|
29
|
+
}) => Promise<T>;
|
|
30
|
+
aiAction: (taskPrompt: string) => ReturnType<PageTaskExecutor['action']>;
|
|
31
|
+
aiQuery: <T = any>(demand: any) => Promise<T>;
|
|
32
|
+
aiAssert: (assertion: string, errorMsg?: string) => Promise<void>;
|
|
33
|
+
aiWaitFor: (assertion: string, opt?: AgentWaitForOpt) => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { type PlayWrightAiFixtureType, PlaywrightAiFixture };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { W as WebPage } from './page.d-70ed000f.js';
|
|
2
|
+
import { GroupedActionDump, ExecutionDump, AgentWaitForOpt } from '@midscene/core';
|
|
3
|
+
import { P as PageTaskExecutor, A as AiTaskCache } from './tasks-75eae15e.js';
|
|
4
|
+
import 'playwright';
|
|
5
|
+
import 'puppeteer';
|
|
6
|
+
|
|
7
|
+
interface PageAgentOpt {
|
|
8
|
+
testId?: string;
|
|
9
|
+
groupName?: string;
|
|
10
|
+
groupDescription?: string;
|
|
11
|
+
cache?: AiTaskCache;
|
|
12
|
+
generateReport?: boolean;
|
|
13
|
+
autoPrintReportMsg?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare class PageAgent {
|
|
16
|
+
page: WebPage;
|
|
17
|
+
dump: GroupedActionDump;
|
|
18
|
+
reportFile?: string;
|
|
19
|
+
reportFileName?: string;
|
|
20
|
+
taskExecutor: PageTaskExecutor;
|
|
21
|
+
opts: PageAgentOpt;
|
|
22
|
+
constructor(page: WebPage, opts?: PageAgentOpt);
|
|
23
|
+
appendExecutionDump(execution: ExecutionDump): void;
|
|
24
|
+
dumpDataString(): string;
|
|
25
|
+
writeOutActionDumps(): void;
|
|
26
|
+
aiAction(taskPrompt: string): Promise<void>;
|
|
27
|
+
aiQuery(demand: any): Promise<any>;
|
|
28
|
+
aiAssert(assertion: string, msg?: string): Promise<void>;
|
|
29
|
+
aiWaitFor(assertion: string, opt?: AgentWaitForOpt): Promise<void>;
|
|
30
|
+
ai(taskPrompt: string, type?: string): Promise<any>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { PageAgent as PuppeteerAgent };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { W as WebPage } from './page.d-70ed000f.js';
|
|
2
|
+
import Insight, { BaseElement, Rect, UIContext, PlanningAction, AIElementParseResponse, InsightExtractParam, InsightAssertionResponse, PlanningActionParamWaitFor, Executor } from '@midscene/core';
|
|
3
|
+
|
|
4
|
+
declare enum NodeType {
|
|
5
|
+
INPUT = "INPUT Node",
|
|
6
|
+
BUTTON = "BUTTON Node",
|
|
7
|
+
IMG = "IMG Node",
|
|
8
|
+
TEXT = "TEXT Node"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare class WebElementInfo implements BaseElement {
|
|
12
|
+
content: string;
|
|
13
|
+
locator: string;
|
|
14
|
+
rect: Rect;
|
|
15
|
+
center: [number, number];
|
|
16
|
+
page: WebPage;
|
|
17
|
+
id: string;
|
|
18
|
+
attributes: {
|
|
19
|
+
nodeType: NodeType;
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
constructor({ content, rect, page, locator, id, attributes, }: {
|
|
23
|
+
content: string;
|
|
24
|
+
rect: Rect;
|
|
25
|
+
page: WebPage;
|
|
26
|
+
locator: string;
|
|
27
|
+
id: string;
|
|
28
|
+
attributes: {
|
|
29
|
+
nodeType: NodeType;
|
|
30
|
+
[key: string]: string;
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type WebUIContext = UIContext<WebElementInfo> & {
|
|
36
|
+
url: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
type PlanTask = {
|
|
40
|
+
type: 'plan';
|
|
41
|
+
prompt: string;
|
|
42
|
+
pageContext: {
|
|
43
|
+
url: string;
|
|
44
|
+
size: {
|
|
45
|
+
width: number;
|
|
46
|
+
height: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
response: {
|
|
50
|
+
plans: PlanningAction[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
type LocateTask = {
|
|
54
|
+
type: 'locate';
|
|
55
|
+
prompt: string;
|
|
56
|
+
pageContext: {
|
|
57
|
+
url: string;
|
|
58
|
+
size: {
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
response: AIElementParseResponse;
|
|
64
|
+
};
|
|
65
|
+
type AiTasks = Array<PlanTask | LocateTask>;
|
|
66
|
+
type AiTaskCache = {
|
|
67
|
+
aiTasks: AiTasks;
|
|
68
|
+
};
|
|
69
|
+
declare class TaskCache {
|
|
70
|
+
cache: AiTaskCache | undefined;
|
|
71
|
+
newCache: AiTaskCache;
|
|
72
|
+
constructor(opts?: {
|
|
73
|
+
cache: AiTaskCache;
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* Read and return cached responses asynchronously based on specific criteria
|
|
77
|
+
* This function is mainly used to read cached responses from a certain storage medium.
|
|
78
|
+
* It accepts three parameters: the page context information, the task type, and the user's prompt information.
|
|
79
|
+
* In the function, it first checks whether there is cached data. If there is, it retrieves the first task response from the cache.
|
|
80
|
+
* It then checks whether the task type is 'locate' and whether the corresponding element can be found in the new context.
|
|
81
|
+
* If the element cannot be found, it returns false, indicating that the cache is invalid.
|
|
82
|
+
* If the task type is correct and the user prompt matches, it checks whether the page context is the same.
|
|
83
|
+
* If the page context is the same, it returns the cached response, indicating that the cache hit is successful.
|
|
84
|
+
* If there is no cached data or the conditions are not met, the function returns false, indicating that no cache is available or the cache is not hit.
|
|
85
|
+
*
|
|
86
|
+
* @param pageContext UIContext<WebElementInfo> type, representing the context information of the current page
|
|
87
|
+
* @param type String type, specifying the task type, can be 'plan' or 'locate'
|
|
88
|
+
* @param userPrompt String type, representing user prompt information
|
|
89
|
+
* @return Returns a Promise object that resolves to a boolean or object
|
|
90
|
+
*/
|
|
91
|
+
readCache(pageContext: WebUIContext, type: 'plan', userPrompt: string): PlanTask['response'];
|
|
92
|
+
readCache(pageContext: WebUIContext, type: 'locate', userPrompt: string): LocateTask['response'];
|
|
93
|
+
saveCache(cache: PlanTask | LocateTask): void;
|
|
94
|
+
pageContextEqual(taskPageContext: LocateTask['pageContext'], pageContext: WebUIContext): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Generate task cache data.
|
|
97
|
+
* This method is mainly used to create or obtain some cached data for tasks, and it returns a new cache object.
|
|
98
|
+
* In the cache object, it may contain task-related information, states, or other necessary data.
|
|
99
|
+
* It is assumed that the `newCache` property already exists in the current class or object and is a data structure used to store task cache.
|
|
100
|
+
* @returns {Object} Returns a new cache object, which may include task cache data.
|
|
101
|
+
*/
|
|
102
|
+
generateTaskCache(): AiTaskCache;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
interface ExecutionResult<OutputType = any> {
|
|
106
|
+
output: OutputType;
|
|
107
|
+
executor: Executor;
|
|
108
|
+
}
|
|
109
|
+
declare class PageTaskExecutor {
|
|
110
|
+
page: WebPage;
|
|
111
|
+
insight: Insight<WebElementInfo, WebUIContext>;
|
|
112
|
+
taskCache: TaskCache;
|
|
113
|
+
constructor(page: WebPage, opts: {
|
|
114
|
+
cache: AiTaskCache;
|
|
115
|
+
});
|
|
116
|
+
private recordScreenshot;
|
|
117
|
+
private wrapExecutorWithScreenshot;
|
|
118
|
+
private convertPlanToExecutable;
|
|
119
|
+
action(userPrompt: string): Promise<ExecutionResult>;
|
|
120
|
+
query(demand: InsightExtractParam): Promise<ExecutionResult>;
|
|
121
|
+
assert(assertion: string): Promise<ExecutionResult<InsightAssertionResponse>>;
|
|
122
|
+
waitFor(assertion: string, opt: PlanningActionParamWaitFor): Promise<ExecutionResult<void>>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { type AiTaskCache as A, PageTaskExecutor as P };
|
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.3.
|
|
4
|
+
"version": "0.3.3",
|
|
5
5
|
"jsnext:source": "./src/index.ts",
|
|
6
6
|
"main": "./dist/lib/index.js",
|
|
7
7
|
"module": "./dist/es/index.js",
|
|
@@ -12,11 +12,26 @@
|
|
|
12
12
|
"import": "./dist/es/index.js",
|
|
13
13
|
"require": "./dist/lib/index.js"
|
|
14
14
|
},
|
|
15
|
+
"./puppeteer": {
|
|
16
|
+
"types": "./dist/types/puppeteer.d.ts",
|
|
17
|
+
"import": "./dist/es/puppeteer.js",
|
|
18
|
+
"require": "./dist/lib/puppeteer.js"
|
|
19
|
+
},
|
|
20
|
+
"./playwright": {
|
|
21
|
+
"types": "./dist/types/playwright.d.ts",
|
|
22
|
+
"import": "./dist/es/playwright.js",
|
|
23
|
+
"require": "./dist/lib/playwright.js"
|
|
24
|
+
},
|
|
15
25
|
"./playwright-report": {
|
|
16
26
|
"types": "./dist/types/playwright-report.d.ts",
|
|
17
27
|
"import": "./dist/es/playwright-report.js",
|
|
18
28
|
"require": "./dist/lib/playwright-report.js"
|
|
19
29
|
},
|
|
30
|
+
"./debug": {
|
|
31
|
+
"types": "./dist/types/debug.d.ts",
|
|
32
|
+
"import": "./dist/es/debug.js",
|
|
33
|
+
"require": "./dist/lib/debug.js"
|
|
34
|
+
},
|
|
20
35
|
"./constants": {
|
|
21
36
|
"types": "./dist/types/constants.d.ts",
|
|
22
37
|
"import": "./dist/es/constants.js",
|
|
@@ -33,9 +48,18 @@
|
|
|
33
48
|
".": [
|
|
34
49
|
"./dist/types/index.d.ts"
|
|
35
50
|
],
|
|
51
|
+
"puppeteer": [
|
|
52
|
+
"./dist/types/puppeteer.d.ts"
|
|
53
|
+
],
|
|
54
|
+
"playwright": [
|
|
55
|
+
"./dist/types/playwright.d.ts"
|
|
56
|
+
],
|
|
36
57
|
"playwright-report": [
|
|
37
58
|
"./dist/types/playwright-report.d.ts"
|
|
38
59
|
],
|
|
60
|
+
"debug": [
|
|
61
|
+
"./dist/types/debug.d.ts"
|
|
62
|
+
],
|
|
39
63
|
"constants": [
|
|
40
64
|
"./dist/types/constants.d.ts"
|
|
41
65
|
],
|
|
@@ -52,7 +76,7 @@
|
|
|
52
76
|
"openai": "4.47.1",
|
|
53
77
|
"sharp": "0.33.3",
|
|
54
78
|
"inquirer": "10.1.5",
|
|
55
|
-
"@midscene/core": "0.3.
|
|
79
|
+
"@midscene/core": "0.3.3"
|
|
56
80
|
},
|
|
57
81
|
"devDependencies": {
|
|
58
82
|
"@modern-js/module-tools": "^2.56.1",
|