epii-types-rpa 1.5.7 → 1.5.8
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/package.json +1 -1
- package/rpa.d.ts +21 -1
package/package.json
CHANGED
package/rpa.d.ts
CHANGED
|
@@ -12,6 +12,14 @@ interface RequestHandler {
|
|
|
12
12
|
path?: string
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
interface InjectScriptOption {
|
|
16
|
+
rule: String,
|
|
17
|
+
scriptPath: String,
|
|
18
|
+
isModuleWhenPage?: boolean
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
15
23
|
interface FormItem {
|
|
16
24
|
key: String,
|
|
17
25
|
title?: String,
|
|
@@ -31,6 +39,7 @@ type ExcelSheetItem = {
|
|
|
31
39
|
}
|
|
32
40
|
|
|
33
41
|
type PageHander = {
|
|
42
|
+
url: () => Promise<string>;
|
|
34
43
|
evaluateFunction: (func: Function, data?: Object) => Promise<any>;
|
|
35
44
|
waitForSelector: (selector: string) => Promise;
|
|
36
45
|
waitForTrue: (func: Function, data?: Object) => Promise;
|
|
@@ -41,6 +50,7 @@ type PageHander = {
|
|
|
41
50
|
goto(url: string): Promise;
|
|
42
51
|
setContent(html: string): Promise;
|
|
43
52
|
close(): Promise;
|
|
53
|
+
bringToFront(): Promise;
|
|
44
54
|
mouse: {
|
|
45
55
|
down: (options?: Object) => Promise<void>;
|
|
46
56
|
move: (x: number, y: number, options?: Object) => Promise<void>;
|
|
@@ -49,6 +59,11 @@ type PageHander = {
|
|
|
49
59
|
}
|
|
50
60
|
};
|
|
51
61
|
|
|
62
|
+
interface WaitForUserContinueOptions {
|
|
63
|
+
tipText?: String,
|
|
64
|
+
btnText?: String,
|
|
65
|
+
onBtnClick?: Function
|
|
66
|
+
}
|
|
52
67
|
|
|
53
68
|
|
|
54
69
|
declare namespace rpa {
|
|
@@ -110,7 +125,8 @@ declare namespace rpa {
|
|
|
110
125
|
namespace tools {
|
|
111
126
|
function keep(maxTime: Number, promise: Promise, errorMsg: String = null): Promise<any>
|
|
112
127
|
function getUrlHost(url: String): String;
|
|
113
|
-
function
|
|
128
|
+
function addInjectScriptForUrl(option: InjectScriptOption): Promise;
|
|
129
|
+
function addRequestHandler(r: RequestHandler): Promise;
|
|
114
130
|
function uploadFile(domOrSelector: | String | Element, path: String | Array<String>): Promise
|
|
115
131
|
function log(object: any): Promise;
|
|
116
132
|
function getAbsolutePath(path: String): Promise;
|
|
@@ -168,6 +184,8 @@ declare namespace rpa {
|
|
|
168
184
|
|
|
169
185
|
}
|
|
170
186
|
namespace browser {
|
|
187
|
+
function filterPages(filter: Function, data?: Object): Promise<PageHander[]>;
|
|
188
|
+
function pages(): Promise<PageHander[]>;
|
|
171
189
|
function newPageAndGetHandler(url?: string): Promise<PageHander>;
|
|
172
190
|
function newIncognitoPageAndGetHandler(url?: string): Promise<PageHander>;
|
|
173
191
|
function getPageHandler(pageId: string): PageHander;
|
|
@@ -208,6 +226,7 @@ declare namespace rpa {
|
|
|
208
226
|
function removeItem(key: String): Promise;
|
|
209
227
|
}
|
|
210
228
|
namespace view {
|
|
229
|
+
function waitForUserContinue(options: WaitForUserContinueOptions = {}): Promise<null>;
|
|
211
230
|
function prompt(message?: any): Promise;
|
|
212
231
|
function alert(message?: any): Promise;
|
|
213
232
|
function confirm(message?: string): Promise;
|
|
@@ -218,6 +237,7 @@ declare namespace rpa {
|
|
|
218
237
|
function consoleClear();
|
|
219
238
|
function showMaskView(title: String = "");
|
|
220
239
|
function hideMaskView();
|
|
240
|
+
function showAppConsoleView();
|
|
221
241
|
|
|
222
242
|
}
|
|
223
243
|
namespace process {
|