assistsx-js 0.0.2050 → 0.0.2051
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/src/StepAsync.ts +330 -330
- package/src/index.ts +1 -0
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
package/src/StepAsync.ts
CHANGED
|
@@ -12,354 +12,354 @@ import { AssistsXAsync } from "./AssistsXAsync";
|
|
|
12
12
|
import { Step } from "./Step";
|
|
13
13
|
|
|
14
14
|
export class StepAsync {
|
|
15
|
-
|
|
15
|
+
private step: Step;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
/**
|
|
18
|
+
* 构造函数
|
|
19
|
+
* @param step Step实例
|
|
20
|
+
*/
|
|
21
|
+
constructor(step: Step) {
|
|
22
|
+
this.step = step;
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
25
|
+
/**
|
|
26
|
+
* 对单个节点进行截图
|
|
27
|
+
* @param node 目标节点
|
|
28
|
+
* @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)
|
|
29
|
+
* @returns 截图路径
|
|
30
|
+
*/
|
|
31
|
+
public async takeScreenshotByNode(
|
|
32
|
+
node: Node,
|
|
33
|
+
overlayHiddenScreenshotDelayMillis: number = 250
|
|
34
|
+
): Promise<string> {
|
|
35
|
+
Step.assert(this.step.stepId);
|
|
36
|
+
const result = await AssistsXAsync.takeScreenshotNodes(
|
|
37
|
+
[node],
|
|
38
|
+
overlayHiddenScreenshotDelayMillis
|
|
39
|
+
);
|
|
40
|
+
Step.assert(this.step.stepId);
|
|
41
|
+
return result[0];
|
|
42
|
+
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
44
|
+
/**
|
|
45
|
+
* 对多个节点进行截图
|
|
46
|
+
* @param nodes 目标节点数组
|
|
47
|
+
* @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)
|
|
48
|
+
* @returns 截图路径数组
|
|
49
|
+
*/
|
|
50
|
+
public async takeScreenshotNodes(
|
|
51
|
+
nodes: Node[],
|
|
52
|
+
overlayHiddenScreenshotDelayMillis: number = 250
|
|
53
|
+
): Promise<string[]> {
|
|
54
|
+
Step.assert(this.step.stepId);
|
|
55
|
+
const result = await AssistsXAsync.takeScreenshotNodes(
|
|
56
|
+
nodes,
|
|
57
|
+
overlayHiddenScreenshotDelayMillis
|
|
58
|
+
);
|
|
59
|
+
Step.assert(this.step.stepId);
|
|
60
|
+
return result;
|
|
61
|
+
}
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
63
|
+
/**
|
|
64
|
+
* 获取所有符合条件的节点
|
|
65
|
+
* @param filterClass 类名过滤
|
|
66
|
+
* @param filterViewId 视图ID过滤
|
|
67
|
+
* @param filterDes 描述过滤
|
|
68
|
+
* @param filterText 文本过滤
|
|
69
|
+
* @returns 节点数组
|
|
70
|
+
*/
|
|
71
|
+
public async getAllNodes({
|
|
72
|
+
filterClass,
|
|
73
|
+
filterViewId,
|
|
74
|
+
filterDes,
|
|
75
|
+
filterText,
|
|
76
|
+
}: {
|
|
77
|
+
filterClass?: string;
|
|
78
|
+
filterViewId?: string;
|
|
79
|
+
filterDes?: string;
|
|
80
|
+
filterText?: string;
|
|
81
|
+
} = {}): Promise<Node[]> {
|
|
82
|
+
Step.assert(this.step.stepId);
|
|
83
|
+
const nodes = await AssistsXAsync.getAllNodes({
|
|
84
|
+
filterClass,
|
|
85
|
+
filterViewId,
|
|
86
|
+
filterDes,
|
|
87
|
+
filterText,
|
|
88
|
+
});
|
|
89
|
+
Step.assert(this.step.stepId);
|
|
90
|
+
Step.assignIdsToNodes(nodes, this.step.stepId);
|
|
91
|
+
return nodes;
|
|
92
|
+
}
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
94
|
+
/**
|
|
95
|
+
* 启动应用
|
|
96
|
+
* @param packageName 应用包名
|
|
97
|
+
* @returns 是否启动成功
|
|
98
|
+
*/
|
|
99
|
+
public async launchApp(packageName: string): Promise<boolean> {
|
|
100
|
+
Step.assert(this.step.stepId);
|
|
101
|
+
const result = await AssistsXAsync.launchApp(packageName);
|
|
102
|
+
Step.assert(this.step.stepId);
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
106
|
+
/**
|
|
107
|
+
* 获取当前应用包名
|
|
108
|
+
* @returns 包名
|
|
109
|
+
*/
|
|
110
|
+
public async getPackageName(): Promise<string> {
|
|
111
|
+
Step.assert(this.step.stepId);
|
|
112
|
+
const result = await AssistsXAsync.getPackageName();
|
|
113
|
+
Step.assert(this.step.stepId);
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
117
|
+
/**
|
|
118
|
+
* 通过ID查找节点
|
|
119
|
+
* @param id 节点ID
|
|
120
|
+
* @param filterClass 类名过滤
|
|
121
|
+
* @param filterText 文本过滤
|
|
122
|
+
* @param filterDes 描述过滤
|
|
123
|
+
* @returns 节点数组
|
|
124
|
+
*/
|
|
125
|
+
public async findById(
|
|
126
|
+
id: string,
|
|
127
|
+
{
|
|
128
|
+
filterClass,
|
|
129
|
+
filterText,
|
|
130
|
+
filterDes,
|
|
131
|
+
}: { filterClass?: string; filterText?: string; filterDes?: string } = {}
|
|
132
|
+
): Promise<Node[]> {
|
|
133
|
+
Step.assert(this.step.stepId);
|
|
134
|
+
const nodes = await AssistsXAsync.findById(id, {
|
|
135
|
+
filterClass,
|
|
136
|
+
filterText,
|
|
137
|
+
filterDes,
|
|
138
|
+
});
|
|
139
|
+
Step.assert(this.step.stepId);
|
|
140
|
+
Step.assignIdsToNodes(nodes, this.step.stepId);
|
|
141
|
+
return nodes;
|
|
142
|
+
}
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
144
|
+
/**
|
|
145
|
+
* 通过文本查找节点
|
|
146
|
+
* @param text 要查找的文本
|
|
147
|
+
* @param filterClass 类名过滤
|
|
148
|
+
* @param filterViewId 视图ID过滤
|
|
149
|
+
* @param filterDes 描述过滤
|
|
150
|
+
* @returns 节点数组
|
|
151
|
+
*/
|
|
152
|
+
public async findByText(
|
|
153
|
+
text: string,
|
|
154
|
+
{
|
|
155
|
+
filterClass,
|
|
156
|
+
filterViewId,
|
|
157
|
+
filterDes,
|
|
158
|
+
}: { filterClass?: string; filterViewId?: string; filterDes?: string } = {}
|
|
159
|
+
): Promise<Node[]> {
|
|
160
|
+
Step.assert(this.step.stepId);
|
|
161
|
+
const nodes = await AssistsXAsync.findByText(text, {
|
|
162
|
+
filterClass,
|
|
163
|
+
filterViewId,
|
|
164
|
+
filterDes,
|
|
165
|
+
});
|
|
166
|
+
Step.assert(this.step.stepId);
|
|
167
|
+
Step.assignIdsToNodes(nodes, this.step.stepId);
|
|
168
|
+
return nodes;
|
|
169
|
+
}
|
|
170
170
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
171
|
+
/**
|
|
172
|
+
* 通过标签查找节点
|
|
173
|
+
* @param className 类名
|
|
174
|
+
* @param filterText 文本过滤
|
|
175
|
+
* @param filterViewId 视图ID过滤
|
|
176
|
+
* @param filterDes 描述过滤
|
|
177
|
+
* @returns 节点数组
|
|
178
|
+
*/
|
|
179
|
+
public async findByTags(
|
|
180
|
+
className: string,
|
|
181
|
+
{
|
|
182
|
+
filterText,
|
|
183
|
+
filterViewId,
|
|
184
|
+
filterDes,
|
|
185
|
+
}: { filterText?: string; filterViewId?: string; filterDes?: string } = {}
|
|
186
|
+
): Promise<Node[]> {
|
|
187
|
+
Step.assert(this.step.stepId);
|
|
188
|
+
const nodes = await AssistsXAsync.findByTags(className, {
|
|
189
|
+
filterText,
|
|
190
|
+
filterViewId,
|
|
191
|
+
filterDes,
|
|
192
|
+
});
|
|
193
|
+
Step.assert(this.step.stepId);
|
|
194
|
+
Step.assignIdsToNodes(nodes, this.step.stepId);
|
|
195
|
+
return nodes;
|
|
196
|
+
}
|
|
197
197
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
198
|
+
/**
|
|
199
|
+
* 查找所有匹配文本的节点
|
|
200
|
+
* @param text 要查找的文本
|
|
201
|
+
* @returns 节点数组
|
|
202
|
+
*/
|
|
203
|
+
public async findByTextAllMatch(text: string): Promise<Node[]> {
|
|
204
|
+
Step.assert(this.step.stepId);
|
|
205
|
+
const nodes = await AssistsXAsync.findByTextAllMatch(text);
|
|
206
|
+
Step.assert(this.step.stepId);
|
|
207
|
+
Step.assignIdsToNodes(nodes, this.step.stepId);
|
|
208
|
+
return nodes;
|
|
209
|
+
}
|
|
210
210
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
211
|
+
/**
|
|
212
|
+
* 检查是否包含指定文本
|
|
213
|
+
* @param text 要检查的文本
|
|
214
|
+
* @returns 是否包含
|
|
215
|
+
*/
|
|
216
|
+
public async containsText(text: string): Promise<boolean> {
|
|
217
|
+
Step.assert(this.step.stepId);
|
|
218
|
+
const result = await AssistsXAsync.containsText(text);
|
|
219
|
+
Step.assert(this.step.stepId);
|
|
220
|
+
return result;
|
|
221
|
+
}
|
|
222
222
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
223
|
+
/**
|
|
224
|
+
* 获取所有文本
|
|
225
|
+
* @returns 文本数组
|
|
226
|
+
*/
|
|
227
|
+
public async getAllText(): Promise<string[]> {
|
|
228
|
+
Step.assert(this.step.stepId);
|
|
229
|
+
const texts = await AssistsXAsync.getAllText();
|
|
230
|
+
Step.assert(this.step.stepId);
|
|
231
|
+
return texts;
|
|
232
|
+
}
|
|
233
233
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
234
|
+
/**
|
|
235
|
+
* 执行点击手势
|
|
236
|
+
* @param x 横坐标
|
|
237
|
+
* @param y 纵坐标
|
|
238
|
+
* @param duration 持续时间(毫秒)
|
|
239
|
+
* @returns 是否成功
|
|
240
|
+
*/
|
|
241
|
+
public async clickByGesture(
|
|
242
|
+
x: number,
|
|
243
|
+
y: number,
|
|
244
|
+
duration: number
|
|
245
|
+
): Promise<boolean> {
|
|
246
|
+
Step.assert(this.step.stepId);
|
|
247
|
+
const result = await AssistsXAsync.clickByGesture(x, y, duration);
|
|
248
|
+
Step.assert(this.step.stepId);
|
|
249
|
+
return result;
|
|
250
|
+
}
|
|
251
251
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
252
|
+
public async longPressGestureAutoPaste(
|
|
253
|
+
point: { x: number; y: number },
|
|
254
|
+
text: string,
|
|
255
|
+
{
|
|
256
|
+
matchedPackageName,
|
|
257
|
+
matchedText,
|
|
258
|
+
timeoutMillis,
|
|
259
|
+
longPressDuration,
|
|
260
|
+
}: {
|
|
261
|
+
matchedPackageName?: string;
|
|
262
|
+
matchedText?: string;
|
|
263
|
+
timeoutMillis?: number;
|
|
264
|
+
longPressDuration?: number;
|
|
265
|
+
} = { matchedText: "粘贴", timeoutMillis: 1500, longPressDuration: 600 }
|
|
266
|
+
): Promise<boolean> {
|
|
267
|
+
Step.assert(this.step.stepId);
|
|
268
|
+
const result = await AssistsXAsync.longPressGestureAutoPaste(point, text, {
|
|
269
|
+
matchedPackageName,
|
|
270
|
+
matchedText,
|
|
271
|
+
timeoutMillis,
|
|
272
|
+
longPressDuration,
|
|
273
|
+
});
|
|
274
|
+
Step.assert(this.step.stepId);
|
|
275
|
+
return result;
|
|
276
|
+
}
|
|
277
|
+
public async getAppInfo(packageName: string): Promise<any> {
|
|
278
|
+
Step.assert(this.step.stepId);
|
|
279
|
+
const result = await AssistsXAsync.getAppInfo(packageName);
|
|
280
|
+
Step.assert(this.step.stepId);
|
|
281
|
+
return result;
|
|
282
|
+
}
|
|
283
|
+
public async performLinearGesture(
|
|
284
|
+
startPoint: { x: number; y: number },
|
|
285
|
+
endPoint: { x: number; y: number },
|
|
286
|
+
{ duration }: { duration?: number } = {}
|
|
287
|
+
): Promise<boolean> {
|
|
288
|
+
Step.assert(this.step.stepId);
|
|
289
|
+
const result = await AssistsXAsync.performLinearGesture(
|
|
290
|
+
startPoint,
|
|
291
|
+
endPoint,
|
|
292
|
+
{
|
|
293
|
+
duration,
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
Step.assert(this.step.stepId);
|
|
297
|
+
return result;
|
|
298
|
+
}
|
|
299
299
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
300
|
+
/**
|
|
301
|
+
* 返回操作
|
|
302
|
+
* @returns 是否成功
|
|
303
|
+
*/
|
|
304
|
+
public async back(): Promise<boolean> {
|
|
305
|
+
Step.assert(this.step.stepId);
|
|
306
|
+
const result = await AssistsXAsync.back();
|
|
307
|
+
Step.assert(this.step.stepId);
|
|
308
|
+
return result;
|
|
309
|
+
}
|
|
310
310
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
311
|
+
/**
|
|
312
|
+
* 回到主页
|
|
313
|
+
* @returns 是否成功
|
|
314
|
+
*/
|
|
315
|
+
public async home(): Promise<boolean> {
|
|
316
|
+
Step.assert(this.step.stepId);
|
|
317
|
+
const result = await AssistsXAsync.home();
|
|
318
|
+
Step.assert(this.step.stepId);
|
|
319
|
+
return result;
|
|
320
|
+
}
|
|
321
321
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
322
|
+
/**
|
|
323
|
+
* 打开通知栏
|
|
324
|
+
* @returns 是否成功
|
|
325
|
+
*/
|
|
326
|
+
public async notifications(): Promise<boolean> {
|
|
327
|
+
Step.assert(this.step.stepId);
|
|
328
|
+
const result = await AssistsXAsync.notifications();
|
|
329
|
+
Step.assert(this.step.stepId);
|
|
330
|
+
return result;
|
|
331
|
+
}
|
|
332
332
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
333
|
+
/**
|
|
334
|
+
* 显示最近应用
|
|
335
|
+
* @returns 是否成功
|
|
336
|
+
*/
|
|
337
|
+
public async recentApps(): Promise<boolean> {
|
|
338
|
+
Step.assert(this.step.stepId);
|
|
339
|
+
const result = await AssistsXAsync.recentApps();
|
|
340
|
+
Step.assert(this.step.stepId);
|
|
341
|
+
return result;
|
|
342
|
+
}
|
|
343
343
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
344
|
+
/**
|
|
345
|
+
* 获取屏幕尺寸
|
|
346
|
+
* @returns 屏幕尺寸对象
|
|
347
|
+
*/
|
|
348
|
+
public async getScreenSize(): Promise<any> {
|
|
349
|
+
Step.assert(this.step.stepId);
|
|
350
|
+
const data = await AssistsXAsync.getScreenSize();
|
|
351
|
+
Step.assert(this.step.stepId);
|
|
352
|
+
return data;
|
|
353
|
+
}
|
|
354
354
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
355
|
+
/**
|
|
356
|
+
* 获取应用窗口尺寸
|
|
357
|
+
* @returns 应用窗口尺寸对象
|
|
358
|
+
*/
|
|
359
|
+
public async getAppScreenSize(): Promise<any> {
|
|
360
|
+
Step.assert(this.step.stepId);
|
|
361
|
+
const data = await AssistsXAsync.getAppScreenSize();
|
|
362
|
+
Step.assert(this.step.stepId);
|
|
363
|
+
return data;
|
|
364
|
+
}
|
|
365
365
|
}
|
package/src/index.ts
CHANGED