• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FRONTEND_API_DEFINES_H
17 #define FRONTEND_API_DEFINES_H
18 
19 #include <initializer_list>
20 #include <string_view>
21 #include <map>
22 #include "json.hpp"
23 
24 namespace OHOS::uitest {
25     enum ErrCode : uint32_t {
26         /**Old ErrorCode*/
27         NO_ERROR = 0,
28         /**Internal error, not expected to happen.*/
29         INTERNAL_ERROR = 1,
30         /**Widget that is expected to be exist lost.*/
31         WIDGET_LOST = 2,
32         /**Window that is expected to be exist lost.*/
33         WINDOW_LOST = 3,
34         /**The user assertion failure.*/
35         ASSERTION_FAILURE = 4,
36         USAGE_ERROR = 5,
37         /**New ErrorCode*/
38         /**Initialize failed.*/
39         ERR_INITIALIZE_FAILED = 17000001,
40         /**API does not allow calling concurrently.*/
41         ERR_API_USAGE = 17000002,
42         /**Component existence assertion failed.*/
43         ERR_ASSERTION_FAILED = 17000003,
44         /**Component lost/UiWindow lost.*/
45         ERR_COMPONENT_LOST = 17000004,
46         /**This operation is not supported.*/
47         ERR_OPERATION_UNSUPPORTED = 17000005,
48         /**Internal error.*/
49         ERR_INTERNAL = 17000006,
50         /**Invalid input parameter.*/
51         ERR_INVALID_INPUT = 401,
52         /**The specified SystemCapability name was not found.*/
53         ERR_NO_SYSTEM_CAPABILITY = 801,
54     };
55 
56     const std::map<ErrCode, std::string> ErrDescMap = {
57         /**Correspondence between error codes and descriptions*/
58         {NO_ERROR, "No Error"},
59         {ERR_INITIALIZE_FAILED, "Initialize failed."},
60         {ERR_API_USAGE, "API does not allow calling concurrently."},
61         {ERR_ASSERTION_FAILED, "Component existence assertion failed."},
62         {ERR_COMPONENT_LOST, "Component lost/UiWindow lost."},
63         {ERR_OPERATION_UNSUPPORTED, "This operation is not supported."},
64         {ERR_INTERNAL, "Internal error."},
65         {ERR_NO_SYSTEM_CAPABILITY, "The specified SystemCapability name was not found."},
66         {ERR_INVALID_INPUT, "Invalid input parameter."},
67     };
68 
69     /**API invocation error detail wrapper.*/
70     struct ApiCallErr {
71     public:
72         ErrCode code_;
73         std::string message_ = "";
74 
75         ApiCallErr() = delete;
76 
ApiCallErrApiCallErr77         explicit ApiCallErr(ErrCode ec)
78         {
79             code_ = ec;
80             message_ = ErrDescMap.find(ec)->second;
81         }
82 
ApiCallErrApiCallErr83         ApiCallErr(ErrCode ec, std::string_view msg)
84         {
85             code_ = ec;
86             message_ = std::string(msg);
87         }
88     };
89 
90     /**Structure wraps the api-call data.*/
91     struct ApiCallInfo {
92         std::string apiId_;
93         std::string callerObjRef_;
94         nlohmann::json paramList_ = nlohmann::json::array();
95         int32_t fdParamIndex_ = -1; // support fd as param
96     };
97 
98     /**Structure wraps the api-call reply.*/
99     struct ApiReplyInfo {
100         nlohmann::json resultValue_ = nullptr;
101         ApiCallErr exception_ = ApiCallErr(NO_ERROR);
102     };
103 
104     /** Specifications of a frontend enumerator value.*/
105     struct FrontendEnumValueDef {
106         std::string_view name_;
107         std::string_view valueJson_;
108     };
109 
110     /** Specifications of a frontend enumerator.*/
111     struct FrontendEnumeratorDef {
112         std::string_view name_;
113         const FrontendEnumValueDef *values_;
114         size_t valueCount_;
115     };
116 
117     /** Specifications of a frontend json data property.*/
118     struct FrontEndJsonPropDef {
119         std::string_view name_;
120         std::string_view type_;
121         bool required_;
122     };
123     /** Specifications of a frontend json object.*/
124     struct FrontEndJsonDef {
125         std::string_view name_;
126         const FrontEndJsonPropDef *props_;
127         size_t propCount_;
128     };
129 
130     /** Specifications of a frontend class method.*/
131     struct FrontendMethodDef {
132         std::string_view name_;
133         std::string_view signature_;
134         bool static_;
135         bool fast_;
136     };
137 
138     /** Specifications of a frontend class.*/
139     struct FrontEndClassDef {
140         std::string_view name_;
141         const FrontendMethodDef *methods_;
142         size_t methodCount_;
143         bool bindUiDriver_;
144     };
145 
146     /** MatchPattern enumerator definition.*/
147     constexpr FrontendEnumValueDef PATTERN_VALUES[] = {
148         {"EQUALS", "0"},
149         {"CONTAINS", "1"},
150         {"STARTS_WITH", "2"},
151         {"ENDS_WITH", "3"},
152     };
153     constexpr FrontendEnumeratorDef MATCH_PATTERN_DEF = {
154         "MatchPattern",
155         PATTERN_VALUES,
156         sizeof(PATTERN_VALUES) / sizeof(FrontendEnumValueDef),
157     };
158 
159     /** Window ResizeDirection enumerator definition.*/
160     constexpr FrontendEnumValueDef RESIZE_DIRECTION_VALUES[] = {
161         {"LEFT", "0"},    {"RIGHT", "1"},     {"UP", "2"},       {"DOWN", "3"},
162         {"LEFT_UP", "4"}, {"LEFT_DOWN", "5"}, {"RIGHT_UP", "6"}, {"RIGHT_DOWN", "7"},
163     };
164     constexpr FrontendEnumeratorDef RESIZE_DIRECTION_DEF = {
165         "ResizeDirection",
166         RESIZE_DIRECTION_VALUES,
167         sizeof(RESIZE_DIRECTION_VALUES) / sizeof(FrontendEnumValueDef),
168     };
169 
170     /** WindowMode enumerator definition.*/
171     constexpr FrontendEnumValueDef WINDOW_MODE_VALUES[] = {
172         {"FULLSCREEN", "0"},
173         {"PRIMARY", "1"},
174         {"SECONDARY", "2"},
175         {"FLOATING", "3"},
176     };
177     constexpr FrontendEnumeratorDef WINDOW_MODE_DEF = {
178         "WindowMode",
179         WINDOW_MODE_VALUES,
180         sizeof(WINDOW_MODE_VALUES) / sizeof(FrontendEnumValueDef),
181     };
182 
183     /** Describes the rotation of the device display.*/
184     constexpr FrontendEnumValueDef DISPLAY_ROTATION_VALUES[] = {
185         {"ROTATION_0", "0"},
186         {"ROTATION_90", "1"},
187         {"ROTATION_180", "2"},
188         {"ROTATION_270", "3"},
189     };
190     constexpr FrontendEnumeratorDef DISPLAY_ROTATION_DEF = {
191         "DisplayRotation",
192         DISPLAY_ROTATION_VALUES,
193         sizeof(DISPLAY_ROTATION_VALUES) / sizeof(FrontendEnumValueDef),
194     };
195 
196     /** Describes the Button of the mouse.*/
197     constexpr FrontendEnumValueDef MOUSE_BUTTON_VALUES[] = {
198         {"MOUSE_BUTTON_LEFT", "0"},
199         {"MOUSE_BUTTON_RIGHT", "1"},
200         {"MOUSE_BUTTON_MIDDLE", "2"},
201     };
202     constexpr FrontendEnumeratorDef MOUSE_BUTTON_DEF = {
203         "MouseButton",
204         MOUSE_BUTTON_VALUES,
205         sizeof(MOUSE_BUTTON_VALUES) / sizeof(FrontendEnumValueDef),
206     };
207 
208     /** Describes the direction of the UI operation.*/
209     constexpr FrontendEnumValueDef UI_DIRECTION_VALUES[] = {
210         {"LEFT", "0"},
211         {"RIGHT", "1"},
212         {"UP", "2"},
213         {"DOWN", "3"},
214     };
215     constexpr FrontendEnumeratorDef UI_DIRECTION_DEF = {
216         "UiDirection",
217         UI_DIRECTION_VALUES,
218         sizeof(UI_DIRECTION_VALUES) / sizeof(FrontendEnumValueDef),
219     };
220 
221     /** Rect jsonObject definition.*/
222     constexpr FrontEndJsonPropDef RECT_PROPERTIES[] = {
223         {"left", "int", true},
224         {"top", "int", true},
225         {"right", "int", true},
226         {"bottom", "int", true},
227     };
228     constexpr FrontEndJsonDef RECT_DEF = {
229         "Rect",
230         RECT_PROPERTIES,
231         sizeof(RECT_PROPERTIES) / sizeof(FrontEndJsonPropDef),
232     };
233 
234     /** Point jsonObject definition.*/
235     constexpr FrontEndJsonPropDef POINT_PROPERTIES[] = {
236         {"x", "int", true},
237         {"y", "int", true},
238     };
239     constexpr FrontEndJsonDef POINT_DEF = {
240         "Point",
241         POINT_PROPERTIES,
242         sizeof(POINT_PROPERTIES) / sizeof(FrontEndJsonPropDef),
243     };
244 
245     /** WindowFilter jsonObject definition.*/
246     constexpr FrontEndJsonPropDef WINDOW_FILTER_PROPERTIES[] = {
247         {"bundleName", "string", false},
248         {"title", "string", false},
249         {"focused", "bool", false},
250         {"actived", "bool", false}, // Deprecated from API 11
251         {"active", "bool", false},
252     };
253     constexpr FrontEndJsonDef WINDOW_FILTER_DEF = {
254         "WindowFilter",
255         WINDOW_FILTER_PROPERTIES,
256         sizeof(WINDOW_FILTER_PROPERTIES) / sizeof(FrontEndJsonPropDef),
257     };
258 
259     /** UIElementInfo jsonObject definition.*/
260     constexpr FrontEndJsonPropDef UI_ELEMENT_INFO_PROPERTIES[] = {
261         {"bundleName", "string", false},
262         {"text", "string", false},
263         {"type", "string", false},
264     };
265     constexpr FrontEndJsonDef UI_ELEMENT_INFO_DEF = {
266         "UIElementInfo",
267         UI_ELEMENT_INFO_PROPERTIES,
268         sizeof(UI_ELEMENT_INFO_PROPERTIES) / sizeof(FrontEndJsonPropDef),
269     };
270 
271     /** By class definition. deprecated since api 9*/
272     constexpr FrontendMethodDef BY_METHODS[] = {
273         {"By.id", "(int):By", false, true},
274         {"By.text", "(string,int?):By", false, true}, //  MatchPattern enum as int value
275         {"By.key", "(string):By", false, true},
276         {"By.type", "(string):By", false, true},
277         {"By.enabled", "(bool?):By", false, true}, // default bool arg: true
278         {"By.focused", "(bool?):By", false, true},
279         {"By.selected", "(bool?):By", false, true},
280         {"By.clickable", "(bool?):By", false, true},
281         {"By.scrollable", "(bool?):By", false, true},
282         {"By.isBefore", "(By):By", false, true},
283         {"By.isAfter", "(By):By", false, true},
284     };
285     constexpr std::string_view REF_SEED_BY = "On#seed";
286     constexpr FrontEndClassDef BY_DEF = {
287         "By",
288         BY_METHODS,
289         sizeof(BY_METHODS) / sizeof(FrontendMethodDef),
290     };
291 
292     /** UiDriver class definition.*/
293     constexpr FrontendMethodDef UI_DRIVER_METHODS[] = {
294         {"UiDriver.create", "():UiDriver", true, true},
295         {"UiDriver.delayMs", "(int):void", false, false},
296         {"UiDriver.findComponent", "(By):UiComponent", false, false},
297         {"UiDriver.findComponents", "(By):[UiComponent]", false, false},
298         {"UiDriver.screenCap", "(int):bool", false, false}, // fliePath as fileDescription.
299         {"UiDriver.assertComponentExist", "(By):void", false, false},
300         {"UiDriver.pressBack", "():void", false, false},
301         {"UiDriver.triggerKey", "(int):void", false, false},
302         {"UiDriver.swipe", "(int,int,int,int,int?):void", false, false},
303         {"UiDriver.click", "(int,int):void", false, false},
304         {"UiDriver.longClick", "(int,int):void", false, false},
305         {"UiDriver.doubleClick", "(int,int):void", false, false},
306     };
307     constexpr FrontEndClassDef UI_DRIVER_DEF = {
308         "UiDriver",
309         UI_DRIVER_METHODS,
310         sizeof(UI_DRIVER_METHODS) / sizeof(FrontendMethodDef),
311     };
312 
313     /** UiComponent class definition.*/
314     constexpr FrontendMethodDef UI_COMPONENT_METHODS[] = {
315         {"UiComponent.getId", "():int", false, false},
316         {"UiComponent.getText", "():string", false, false},
317         {"UiComponent.getKey", "():string", false, false},
318         {"UiComponent.getType", "():string", false, false},
319         {"UiComponent.isEnabled", "():bool", false, false},
320         {"UiComponent.isFocused", "():bool", false, false},
321         {"UiComponent.isSelected", "():bool", false, false},
322         {"UiComponent.isClickable", "():bool", false, false},
323         {"UiComponent.isScrollable", "():bool", false, false},
324         {"UiComponent.click", "():void", false, false},
325         {"UiComponent.longClick", "():void", false, false},
326         {"UiComponent.doubleClick", "():void", false, false},
327         {"UiComponent.inputText", "(string):void", false, false},
328         {"UiComponent.scrollSearch", "(By):UiComponent", false, false},
329     };
330     constexpr FrontEndClassDef UI_COMPONENT_DEF = {
331         "UiComponent",
332         UI_COMPONENT_METHODS,
333         sizeof(UI_COMPONENT_METHODS) / sizeof(FrontendMethodDef),
334     };
335 
336     /** On class definition(since api 9, outdates By class).*/
337     constexpr FrontendMethodDef ON_METHODS[] = {
338         {"On.text", "(string,int?):On", false, true}, //  MatchPattern enum as int value
339         {"On.id", "(string):On", false, true},
340         {"On.type", "(string):On", false, true},
341         {"On.description", "(string,int?):On", false, true},
342         {"On.enabled", "(bool?):On", false, true}, // default bool arg: true
343         {"On.focused", "(bool?):On", false, true},
344         {"On.selected", "(bool?):On", false, true},
345         {"On.clickable", "(bool?):On", false, true},
346         {"On.longClickable", "(bool?):On", false, true},
347         {"On.scrollable", "(bool?):On", false, true},
348         {"On.checkable", "(bool?):On", false, true},
349         {"On.checked", "(bool?):On", false, true},
350         {"On.isBefore", "(On):On", false, true},
351         {"On.isAfter", "(On):On", false, true},
352         {"On.within", "(On):On", false, true},
353         {"On.inWindow", "(string):On", false, true},
354     };
355 
356     constexpr std::string_view REF_SEED_ON = "On#seed";
357     constexpr FrontEndClassDef ON_DEF = {
358         "On",
359         ON_METHODS,
360         sizeof(ON_METHODS) / sizeof(FrontendMethodDef),
361     };
362 
363     /** Driver class definition. (since api 9, outdates UiDriver)*/
364     constexpr FrontendMethodDef DRIVER_METHODS[] = {
365         {"Driver.create", "():Driver", true, true},
366         {"Driver.delayMs", "(int):void", false, false},
367         {"Driver.findComponent", "(On):Component", false, false},
368         {"Driver.findWindow", "(WindowFilter):UiWindow", false, false},
369         {"Driver.findComponents", "(On):[Component]", false, false},
370         {"Driver.waitForComponent", "(On,int):Component", false, false},
371         {"Driver.screenCap", "(int):bool", false, false},            // fliePath as fileDescription.
372         {"Driver.screenCapture", "(int, Rect?):bool", false, false}, // fliePath as fileDescription.
373         {"Driver.assertComponentExist", "(On):void", false, false},
374         {"Driver.pressBack", "():void", false, false},
375         {"Driver.triggerKey", "(int):void", false, false},
376         {"Driver.triggerCombineKeys", "(int,int,int?):void", false, false},
377         {"Driver.click", "(int,int):void", false, false},
378         {"Driver.longClick", "(int,int):void", false, false},
379         {"Driver.doubleClick", "(int,int):void", false, false},
380         {"Driver.swipe", "(int,int,int,int,int?):void", false, false},
381         {"Driver.drag", "(int,int,int,int,int?):void", false, false},
382         {"Driver.setDisplayRotation", "(int):void", false, false},  // DisplayRotation enum as int value
383         {"Driver.getDisplayRotation", "():int", false, false},  // DisplayRotation enum as int value
384         {"Driver.setDisplayRotationEnabled", "(bool):void", false, false},
385         {"Driver.getDisplaySize", "():Point", false, false},
386         {"Driver.getDisplayDensity", "():Point", false, false},
387         {"Driver.wakeUpDisplay", "():void", false, false},
388         {"Driver.pressHome", "():void", false, false},
389         {"Driver.waitForIdle", "(int,int):bool", false, false},
390         {"Driver.fling", "(Point,Point,int,int):void", false, false},
391         {"Driver.fling", "(int,int):void", false, false},
392         {"Driver.injectMultiPointerAction", "(PointerMatrix, int?):bool", false, false},
393         {"Driver.mouseClick", "(Point,int,int?,int?):void", false, false},
394         {"Driver.mouseDoubleClick", "(Point,int,int?,int?):void", false, false},
395         {"Driver.mouseLongClick", "(Point,int,int?,int?):void", false, false},
396         {"Driver.mouseMoveTo", "(Point):void", false, false},
397         {"Driver.mouseMoveWithTrack", "(Point,Point,int?):void", false, false},
398         {"Driver.mouseDrag", "(Point,Point,int?):void", false, false},
399         {"Driver.mouseScroll", "(Point,bool,int,int?,int?,int?):void", false, false},
400         {"Driver.createUIEventObserver", "():UIEventObserver", false, false},
401         {"Driver.inputText", "(Point,string):void", false, false},
402     };
403     constexpr FrontEndClassDef DRIVER_DEF = {
404         "Driver",
405         DRIVER_METHODS,
406         sizeof(DRIVER_METHODS) / sizeof(FrontendMethodDef),
407     };
408 
409     /** Component class definition.(since api 9, outdates UiComponent)*/
410     constexpr FrontendMethodDef COMPONENT_METHODS[] = {
411         {"Component.getText", "():string", false, false},
412         {"Component.getId", "():string", false, false},
413         {"Component.getType", "():string", false, false},
414         {"Component.getDescription", "():string", false, false},
415         {"Component.isEnabled", "():bool", false, false},
416         {"Component.isFocused", "():bool", false, false},
417         {"Component.isSelected", "():bool", false, false},
418         {"Component.isClickable", "():bool", false, false},
419         {"Component.isLongClickable", "():bool", false, false},
420         {"Component.isScrollable", "():bool", false, false},
421         {"Component.isCheckable", "():bool", false, false},
422         {"Component.isChecked", "():bool", false, false},
423         {"Component.getBounds", "():Rect", false, false},
424         {"Component.getBoundsCenter", "():Point", false, false},
425         {"Component.click", "():void", false, false},
426         {"Component.longClick", "():void", false, false},
427         {"Component.doubleClick", "():void", false, false},
428         {"Component.scrollToTop", "(int?):void", false, false},
429         {"Component.scrollToBottom", "(int?):void", false, false},
430         {"Component.inputText", "(string):void", false, false},
431         {"Component.clearText", "():void", false, false},
432         {"Component.scrollSearch", "(On):Component", false, false},
433         {"Component.dragTo", "(Component):void", false, false},
434         {"Component.pinchOut", "(float):void", false, false},
435         {"Component.pinchIn", "(float):void", false, false},
436     };
437     constexpr FrontEndClassDef COMPONENT_DEF = {
438         "Component",
439         COMPONENT_METHODS,
440         sizeof(COMPONENT_METHODS) / sizeof(FrontendMethodDef),
441     };
442 
443     /** UiWindow class definition.*/
444     constexpr FrontendMethodDef UI_WINDOW_METHODS[] = {
445         {"UiWindow.getBundleName", "():string", false, false},
446         {"UiWindow.getBounds", "():Rect", false, false},
447         {"UiWindow.getTitle", "():string", false, false},
448         {"UiWindow.getWindowMode", "():int", false, false}, // WindowMode enum as int value
449         {"UiWindow.isFocused", "():bool", false, false},
450         {"UiWindow.isActived", "():bool", false, false}, // Deprecated from API 11
451         {"UiWindow.isActive", "():bool", false, false},
452         {"UiWindow.focus", "():void", false, false},
453         {"UiWindow.moveTo", "(int,int):void", false, false},
454         {"UiWindow.resize", "(int,int,int):void", false, false}, // ResizeDirection enum as int value
455         {"UiWindow.split", "():void", false, false},
456         {"UiWindow.maximize", "():void", false, false},
457         {"UiWindow.resume", "():void", false, false},
458         {"UiWindow.minimize", "():void", false, false},
459         {"UiWindow.close", "():void", false, false},
460     };
461     constexpr FrontEndClassDef UI_WINDOW_DEF = {
462         "UiWindow",
463         UI_WINDOW_METHODS,
464         sizeof(UI_WINDOW_METHODS) / sizeof(FrontendMethodDef),
465     };
466 
467     /** PointerMatrix class definition.*/
468     constexpr FrontendMethodDef POINTER_MATRIX_METHODS[] = {
469         {"PointerMatrix.create", "(int,int):PointerMatrix", true, true},
470         {"PointerMatrix.setPoint", "(int,int,Point):void", false, true},
471     };
472     constexpr FrontEndClassDef POINTER_MATRIX_DEF = {
473         "PointerMatrix",
474         POINTER_MATRIX_METHODS,
475         sizeof(POINTER_MATRIX_METHODS) / sizeof(FrontendMethodDef),
476     };
477 
478     /** UIEventObserver class definition.*/
479     constexpr FrontendMethodDef UI_EVENT_OBSERVER_METHODS[] = {
480 	    // callback<UIElementInfo> saved in js, works as callbackRef in c++.
481         {"UIEventObserver.once", "(string, string):void", false, true},
482     };
483     constexpr FrontEndClassDef UI_EVENT_OBSERVER_DEF = {
484         "UIEventObserver",
485         UI_EVENT_OBSERVER_METHODS,
486         sizeof(UI_EVENT_OBSERVER_METHODS) / sizeof(FrontendMethodDef),
487     };
488 
489     /** List all the frontend data-type definitions.*/
490     const auto FRONTEND_CLASS_DEFS = {&BY_DEF, &UI_DRIVER_DEF, &UI_COMPONENT_DEF, &ON_DEF,
491                                       &DRIVER_DEF, &COMPONENT_DEF, &UI_WINDOW_DEF, &POINTER_MATRIX_DEF,
492                                       &UI_EVENT_OBSERVER_DEF};
493     const auto FRONTEND_ENUMERATOR_DEFS = {&MATCH_PATTERN_DEF, &WINDOW_MODE_DEF, &RESIZE_DIRECTION_DEF,
494                                            &DISPLAY_ROTATION_DEF, &MOUSE_BUTTON_DEF, &UI_DIRECTION_DEF};
495     const auto FRONTEND_JSON_DEFS = {&RECT_DEF, &POINT_DEF, &WINDOW_FILTER_DEF, &UI_ELEMENT_INFO_DEF};
496     /** The allowed in/out data type scope of frontend apis.*/
497     const std::initializer_list<std::string_view> DATA_TYPE_SCOPE = {
498         "int",
499         "float",
500         "bool",
501         "string",
502         RECT_DEF.name_,
503         POINT_DEF.name_,
504         WINDOW_FILTER_DEF.name_,
505         BY_DEF.name_,
506         UI_DRIVER_DEF.name_,
507         UI_COMPONENT_DEF.name_,
508         ON_DEF.name_,
509         DRIVER_DEF.name_,
510         COMPONENT_DEF.name_,
511         UI_WINDOW_DEF.name_,
512         POINTER_MATRIX_DEF.name_,
513         UI_EVENT_OBSERVER_DEF.name_,
514     };
515 } // namespace OHOS::uitest
516 
517 #endif