@midscene/web 0.27.5 → 0.27.6
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/bin/midscene-playground +1 -1
- package/dist/es/bin.mjs +7 -0
- package/dist/es/bin.mjs.map +1 -0
- 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/page-browser-side.mjs +1 -1
- package/dist/es/index.mjs +2 -3
- package/dist/es/web-element.mjs +3 -3
- package/dist/es/web-element.mjs.map +1 -1
- package/dist/lib/bin.js +13 -0
- package/dist/lib/bin.js.map +1 -0
- 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/page-browser-side.js +1 -1
- package/dist/lib/index.js +6 -16
- package/dist/lib/web-element.js +5 -5
- package/dist/lib/web-element.js.map +1 -1
- package/dist/types/index.d.ts +2 -3
- package/dist/types/web-element.d.ts +3 -11
- package/package.json +7 -25
- package/dist/es/playground/agent.mjs +0 -10
- package/dist/es/playground/agent.mjs.map +0 -1
- package/dist/es/playground/bin.mjs +0 -8
- package/dist/es/playground/bin.mjs.map +0 -1
- package/dist/es/playground/common.mjs +0 -130
- package/dist/es/playground/common.mjs.map +0 -1
- package/dist/es/playground/index.mjs +0 -5
- package/dist/es/playground/server.mjs +0 -256
- package/dist/es/playground/server.mjs.map +0 -1
- package/dist/es/playground/static-page.mjs +0 -104
- package/dist/es/playground/static-page.mjs.map +0 -1
- package/dist/lib/playground/agent.js +0 -44
- package/dist/lib/playground/agent.js.map +0 -1
- package/dist/lib/playground/bin.js +0 -36
- package/dist/lib/playground/bin.js.map +0 -1
- package/dist/lib/playground/common.js +0 -179
- package/dist/lib/playground/common.js.map +0 -1
- package/dist/lib/playground/index.js +0 -66
- package/dist/lib/playground/index.js.map +0 -1
- package/dist/lib/playground/server.js +0 -302
- package/dist/lib/playground/server.js.map +0 -1
- package/dist/lib/playground/static-page.js +0 -138
- package/dist/lib/playground/static-page.js.map +0 -1
- package/dist/types/playground/agent.d.ts +0 -5
- package/dist/types/playground/common.d.ts +0 -10
- package/dist/types/playground/index.d.ts +0 -5
- package/dist/types/playground/server.d.ts +0 -20
- package/dist/types/playground/static-page.d.ts +0 -39
- /package/dist/types/{playground/bin.d.ts → bin.d.ts} +0 -0
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __webpack_require__ = {};
|
|
3
|
-
(()=>{
|
|
4
|
-
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
-
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: definition[key]
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
})();
|
|
11
|
-
(()=>{
|
|
12
|
-
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
-
})();
|
|
14
|
-
(()=>{
|
|
15
|
-
__webpack_require__.r = (exports1)=>{
|
|
16
|
-
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
-
value: 'Module'
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
})();
|
|
24
|
-
var __webpack_exports__ = {};
|
|
25
|
-
__webpack_require__.r(__webpack_exports__);
|
|
26
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
default: ()=>StaticPage
|
|
28
|
-
});
|
|
29
|
-
const external_web_page_js_namespaceObject = require("../web-page.js");
|
|
30
|
-
const common_namespaceObject = require("@midscene/shared/common");
|
|
31
|
-
function _define_property(obj, key, value) {
|
|
32
|
-
if (key in obj) Object.defineProperty(obj, key, {
|
|
33
|
-
value: value,
|
|
34
|
-
enumerable: true,
|
|
35
|
-
configurable: true,
|
|
36
|
-
writable: true
|
|
37
|
-
});
|
|
38
|
-
else obj[key] = value;
|
|
39
|
-
return obj;
|
|
40
|
-
}
|
|
41
|
-
const ThrowNotImplemented = (methodName)=>{
|
|
42
|
-
throw new Error(`The method "${methodName}" is not implemented as designed since this is a static UI context. (${common_namespaceObject.ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED})`);
|
|
43
|
-
};
|
|
44
|
-
class StaticPage {
|
|
45
|
-
actionSpace() {
|
|
46
|
-
return (0, external_web_page_js_namespaceObject.commonWebActionsForWebPage)(this);
|
|
47
|
-
}
|
|
48
|
-
async evaluateJavaScript(script) {
|
|
49
|
-
return ThrowNotImplemented('evaluateJavaScript');
|
|
50
|
-
}
|
|
51
|
-
async getElementsInfo() {
|
|
52
|
-
return ThrowNotImplemented('getElementsInfo');
|
|
53
|
-
}
|
|
54
|
-
async getElementsNodeTree() {
|
|
55
|
-
return ThrowNotImplemented('getElementsNodeTree');
|
|
56
|
-
}
|
|
57
|
-
async getXpathsById(id) {
|
|
58
|
-
return ThrowNotImplemented('getXpathsById');
|
|
59
|
-
}
|
|
60
|
-
async getXpathsByPoint(point) {
|
|
61
|
-
return ThrowNotImplemented('getXpathsByPoint');
|
|
62
|
-
}
|
|
63
|
-
async getElementInfoByXpath(xpath) {
|
|
64
|
-
return ThrowNotImplemented('getElementInfoByXpath');
|
|
65
|
-
}
|
|
66
|
-
async size() {
|
|
67
|
-
return this.uiContext.size;
|
|
68
|
-
}
|
|
69
|
-
async screenshotBase64() {
|
|
70
|
-
const base64 = this.uiContext.screenshotBase64;
|
|
71
|
-
if (!base64) throw new Error('screenshot base64 is empty');
|
|
72
|
-
return base64;
|
|
73
|
-
}
|
|
74
|
-
async url() {
|
|
75
|
-
return Promise.resolve('https://static_page_without_url');
|
|
76
|
-
}
|
|
77
|
-
async scrollUntilTop(startingPoint) {
|
|
78
|
-
return ThrowNotImplemented('scrollUntilTop');
|
|
79
|
-
}
|
|
80
|
-
async scrollUntilBottom(startingPoint) {
|
|
81
|
-
return ThrowNotImplemented('scrollUntilBottom');
|
|
82
|
-
}
|
|
83
|
-
async scrollUntilLeft(startingPoint) {
|
|
84
|
-
return ThrowNotImplemented('scrollUntilLeft');
|
|
85
|
-
}
|
|
86
|
-
async scrollUntilRight(startingPoint) {
|
|
87
|
-
return ThrowNotImplemented('scrollUntilRight');
|
|
88
|
-
}
|
|
89
|
-
async scrollUp(distance, startingPoint) {
|
|
90
|
-
return ThrowNotImplemented('scrollUp');
|
|
91
|
-
}
|
|
92
|
-
async scrollDown(distance, startingPoint) {
|
|
93
|
-
return ThrowNotImplemented('scrollDown');
|
|
94
|
-
}
|
|
95
|
-
async scrollLeft(distance, startingPoint) {
|
|
96
|
-
return ThrowNotImplemented('scrollLeft');
|
|
97
|
-
}
|
|
98
|
-
async scrollRight(distance, startingPoint) {
|
|
99
|
-
return ThrowNotImplemented('scrollRight');
|
|
100
|
-
}
|
|
101
|
-
async clearInput() {
|
|
102
|
-
return ThrowNotImplemented('clearInput');
|
|
103
|
-
}
|
|
104
|
-
async destroy() {}
|
|
105
|
-
async getContext() {
|
|
106
|
-
return this.uiContext;
|
|
107
|
-
}
|
|
108
|
-
constructor(uiContext){
|
|
109
|
-
_define_property(this, "interfaceType", 'static');
|
|
110
|
-
_define_property(this, "uiContext", void 0);
|
|
111
|
-
_define_property(this, "mouse", {
|
|
112
|
-
click: ThrowNotImplemented.bind(null, 'mouse.click'),
|
|
113
|
-
wheel: ThrowNotImplemented.bind(null, 'mouse.wheel'),
|
|
114
|
-
move: ThrowNotImplemented.bind(null, 'mouse.move'),
|
|
115
|
-
drag: ThrowNotImplemented.bind(null, 'mouse.drag')
|
|
116
|
-
});
|
|
117
|
-
_define_property(this, "keyboard", {
|
|
118
|
-
type: ThrowNotImplemented.bind(null, 'keyboard.type'),
|
|
119
|
-
press: ThrowNotImplemented.bind(null, 'keyboard.press')
|
|
120
|
-
});
|
|
121
|
-
if (uiContext.tree) this.uiContext = uiContext;
|
|
122
|
-
else this.uiContext = Object.assign(uiContext, {
|
|
123
|
-
tree: {
|
|
124
|
-
node: null,
|
|
125
|
-
children: []
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
exports["default"] = __webpack_exports__["default"];
|
|
131
|
-
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
132
|
-
"default"
|
|
133
|
-
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
134
|
-
Object.defineProperty(exports, '__esModule', {
|
|
135
|
-
value: true
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
//# sourceMappingURL=static-page.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"playground/static-page.js","sources":["webpack://@midscene/web/webpack/runtime/define_property_getters","webpack://@midscene/web/webpack/runtime/has_own_property","webpack://@midscene/web/webpack/runtime/make_namespace_object","webpack://@midscene/web/./src/playground/static-page.ts"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { commonWebActionsForWebPage } from '@/web-page';\nimport type { DeviceAction, Point, UIContext } from '@midscene/core';\nimport type { AbstractInterface } from '@midscene/core/device';\nimport { ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from '@midscene/shared/common';\nimport type { WebUIContext } from '../web-element';\n\nconst ThrowNotImplemented: any = (methodName: string) => {\n throw new Error(\n `The method \"${methodName}\" is not implemented as designed since this is a static UI context. (${ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED})`,\n );\n};\n\nexport default class StaticPage implements AbstractInterface {\n interfaceType = 'static';\n\n private uiContext: WebUIContext;\n\n constructor(uiContext: WebUIContext) {\n if (uiContext.tree) {\n this.uiContext = uiContext;\n } else {\n this.uiContext = Object.assign(uiContext, {\n tree: {\n node: null,\n children: [],\n },\n });\n }\n }\n\n actionSpace(): DeviceAction[] {\n // Return common web actions for planning, but they won't actually execute\n return commonWebActionsForWebPage(this);\n }\n\n async evaluateJavaScript<T = any>(script: string): Promise<T> {\n return ThrowNotImplemented('evaluateJavaScript');\n }\n\n // @deprecated\n async getElementsInfo() {\n return ThrowNotImplemented('getElementsInfo');\n }\n\n async getElementsNodeTree() {\n return ThrowNotImplemented('getElementsNodeTree');\n }\n\n async getXpathsById(id: string) {\n return ThrowNotImplemented('getXpathsById');\n }\n\n async getXpathsByPoint(point: Point) {\n return ThrowNotImplemented('getXpathsByPoint');\n }\n\n async getElementInfoByXpath(xpath: string) {\n return ThrowNotImplemented('getElementInfoByXpath');\n }\n\n async size() {\n return this.uiContext.size;\n }\n\n async screenshotBase64() {\n const base64 = this.uiContext.screenshotBase64;\n if (!base64) {\n throw new Error('screenshot base64 is empty');\n }\n return base64;\n }\n\n async url() {\n return Promise.resolve('https://static_page_without_url');\n }\n\n async scrollUntilTop(startingPoint?: Point) {\n return ThrowNotImplemented('scrollUntilTop');\n }\n\n async scrollUntilBottom(startingPoint?: Point) {\n return ThrowNotImplemented('scrollUntilBottom');\n }\n\n async scrollUntilLeft(startingPoint?: Point) {\n return ThrowNotImplemented('scrollUntilLeft');\n }\n\n async scrollUntilRight(startingPoint?: Point) {\n return ThrowNotImplemented('scrollUntilRight');\n }\n\n async scrollUp(distance?: number, startingPoint?: Point) {\n return ThrowNotImplemented('scrollUp');\n }\n\n async scrollDown(distance?: number, startingPoint?: Point) {\n return ThrowNotImplemented('scrollDown');\n }\n\n async scrollLeft(distance?: number, startingPoint?: Point) {\n return ThrowNotImplemented('scrollLeft');\n }\n\n async scrollRight(distance?: number, startingPoint?: Point) {\n return ThrowNotImplemented('scrollRight');\n }\n\n async clearInput() {\n return ThrowNotImplemented('clearInput');\n }\n\n mouse = {\n click: ThrowNotImplemented.bind(null, 'mouse.click'),\n wheel: ThrowNotImplemented.bind(null, 'mouse.wheel'),\n move: ThrowNotImplemented.bind(null, 'mouse.move'),\n drag: ThrowNotImplemented.bind(null, 'mouse.drag'),\n };\n\n keyboard = {\n type: ThrowNotImplemented.bind(null, 'keyboard.type'),\n press: ThrowNotImplemented.bind(null, 'keyboard.press'),\n };\n\n async destroy(): Promise<void> {\n //\n }\n\n async getContext(): Promise<UIContext> {\n return this.uiContext;\n }\n}\n"],"names":["__webpack_require__","definition","key","Object","obj","prop","Symbol","ThrowNotImplemented","methodName","Error","ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED","StaticPage","commonWebActionsForWebPage","script","id","point","xpath","base64","Promise","startingPoint","distance","uiContext"],"mappings":"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"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DeviceAction } from '@midscene/core';
|
|
2
|
-
export declare const dataExtractionAPIs: string[];
|
|
3
|
-
export declare const validationAPIs: string[];
|
|
4
|
-
export declare const noReplayAPIs: string[];
|
|
5
|
-
export declare const formatErrorMessage: (e: any) => string;
|
|
6
|
-
export declare function validateStructuredParams(value: any, action: DeviceAction<any> | undefined): {
|
|
7
|
-
valid: boolean;
|
|
8
|
-
errorMessage?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function executeAction(activeAgent: any, actionType: string, actionSpace: DeviceAction<any>[], value: any, deepThink: boolean): Promise<any>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from '@midscene/shared/common';
|
|
2
|
-
import { StaticPageAgent } from './agent';
|
|
3
|
-
import { dataExtractionAPIs, noReplayAPIs, validationAPIs } from './common';
|
|
4
|
-
import StaticPage from './static-page';
|
|
5
|
-
export { StaticPageAgent, StaticPage, ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED, noReplayAPIs, dataExtractionAPIs, validationAPIs, };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Server } from 'node:http';
|
|
2
|
-
import type { Agent as PageAgent } from '@midscene/core/agent';
|
|
3
|
-
import type { AbstractInterface } from '@midscene/core/device';
|
|
4
|
-
import express from 'express';
|
|
5
|
-
export default class PlaygroundServer {
|
|
6
|
-
app: express.Application;
|
|
7
|
-
tmpDir: string;
|
|
8
|
-
server?: Server;
|
|
9
|
-
port?: number | null;
|
|
10
|
-
pageClass: new (...args: any[]) => AbstractInterface;
|
|
11
|
-
agentClass: new (...args: any[]) => PageAgent;
|
|
12
|
-
staticPath?: string;
|
|
13
|
-
taskProgressTips: Record<string, string>;
|
|
14
|
-
activeAgents: Record<string, PageAgent>;
|
|
15
|
-
constructor(pageClass: new (...args: any[]) => AbstractInterface, agentClass: new (...args: any[]) => PageAgent, staticPath?: string);
|
|
16
|
-
filePathForUuid(uuid: string): string;
|
|
17
|
-
saveContextFile(uuid: string, context: string): string;
|
|
18
|
-
launch(port?: number): Promise<unknown>;
|
|
19
|
-
close(): Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse> | undefined;
|
|
20
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { DeviceAction, Point, UIContext } from '@midscene/core';
|
|
2
|
-
import type { AbstractInterface } from '@midscene/core/device';
|
|
3
|
-
import type { WebUIContext } from '../web-element';
|
|
4
|
-
export default class StaticPage implements AbstractInterface {
|
|
5
|
-
interfaceType: string;
|
|
6
|
-
private uiContext;
|
|
7
|
-
constructor(uiContext: WebUIContext);
|
|
8
|
-
actionSpace(): DeviceAction[];
|
|
9
|
-
evaluateJavaScript<T = any>(script: string): Promise<T>;
|
|
10
|
-
getElementsInfo(): Promise<any>;
|
|
11
|
-
getElementsNodeTree(): Promise<any>;
|
|
12
|
-
getXpathsById(id: string): Promise<any>;
|
|
13
|
-
getXpathsByPoint(point: Point): Promise<any>;
|
|
14
|
-
getElementInfoByXpath(xpath: string): Promise<any>;
|
|
15
|
-
size(): Promise<import("@midscene/core").Size>;
|
|
16
|
-
screenshotBase64(): Promise<string>;
|
|
17
|
-
url(): Promise<string>;
|
|
18
|
-
scrollUntilTop(startingPoint?: Point): Promise<any>;
|
|
19
|
-
scrollUntilBottom(startingPoint?: Point): Promise<any>;
|
|
20
|
-
scrollUntilLeft(startingPoint?: Point): Promise<any>;
|
|
21
|
-
scrollUntilRight(startingPoint?: Point): Promise<any>;
|
|
22
|
-
scrollUp(distance?: number, startingPoint?: Point): Promise<any>;
|
|
23
|
-
scrollDown(distance?: number, startingPoint?: Point): Promise<any>;
|
|
24
|
-
scrollLeft(distance?: number, startingPoint?: Point): Promise<any>;
|
|
25
|
-
scrollRight(distance?: number, startingPoint?: Point): Promise<any>;
|
|
26
|
-
clearInput(): Promise<any>;
|
|
27
|
-
mouse: {
|
|
28
|
-
click: any;
|
|
29
|
-
wheel: any;
|
|
30
|
-
move: any;
|
|
31
|
-
drag: any;
|
|
32
|
-
};
|
|
33
|
-
keyboard: {
|
|
34
|
-
type: any;
|
|
35
|
-
press: any;
|
|
36
|
-
};
|
|
37
|
-
destroy(): Promise<void>;
|
|
38
|
-
getContext(): Promise<UIContext>;
|
|
39
|
-
}
|
|
File without changes
|