1/*
2 * Copyright (C) 2021 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 */
15import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'
16import accessibility from '@ohos.accessibility'
17
18const bundleName = 'com.sample.testfora11y';
19const triggerAction = 'accessibilityFocus';
20const eventType = 'accessibilityFocus';
21
22export default function AccessibleSendEvent() {
23describe('AccessibleSendEvent', function () {
24
25    beforeEach(async function (done) {
26        console.info(`AccessibleSendEvent: beforeEach starts`);
27        done();
28    })
29
30    afterEach(async function (done) {
31        console.info(`AccessibleSendEvent: afterEach starts`);
32        done();
33    })
34  /*
35    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0100
36    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_0100
37    * @tc.desc    The beginIndex of EventInfo is 1, test sendEvent() function
38    *             The result of sendEvent() should be equal to a promise of undefined
39    *             Another test point is to test whether the modified constructor (EventInfo)
40    *             works correctly.
41    * @tc.size    SmallTest
42    * @tc.type    User
43    * @tc.level   Level 1
44    */
45  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0100', 0, async function (done) {
46    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0100 starts`);
47
48    let beginIndex = 1;
49    let jsonObj = {
50      type : eventType,
51      bundleName : bundleName,
52      triggerAction : triggerAction,
53      beginIndex : beginIndex,
54    }
55
56    let event = new accessibility.EventInfo(jsonObj);
57
58    accessibility.sendEvent(event).then((result) => {
59      expect(result).assertEqual(undefined);
60      done();
61    }).catch(err => {
62      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0100 has error: ${err}`);
63      expect(null).assertFail();
64      done();
65    });
66  })
67
68  /*
69    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0200
70    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_0200
71    * @tc.desc    The beginIndex of EventInfo is 0, test sendEvent() function
72    *             The result of sendEvent() should be equal to a promise of undefined
73    *             Another test point is to test whether the modified constructor (EventInfo)
74    *             works correctly.
75    * @tc.size    SmallTest
76    * @tc.type    User
77    * @tc.level   Level 1
78    */
79  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0200', 0, async function (done) {
80    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0200 starts`);
81
82    let beginIndex = 0;
83    let jsonObj = {
84      type : eventType,
85      bundleName : bundleName,
86      triggerAction : triggerAction,
87      beginIndex : beginIndex,
88    }
89
90    let event = new accessibility.EventInfo(jsonObj);
91
92    accessibility.sendEvent(event).then((result) => {
93      expect(result).assertEqual(undefined);
94      done();
95    }).catch(err => {
96      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0200 has error: ${err}`);
97      expect(null).assertFail();
98      done();
99    });
100  })
101
102  /*
103    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0300
104    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_0300
105    * @tc.desc    The beginIndex of EventInfo is -1, test sendEvent() function
106    *             The result of sendEvent() should be equal to a promise of undefined
107    *             Another test point is to test whether the modified constructor (EventInfo)
108    *             works correctly.
109    * @tc.size    SmallTest
110    * @tc.type    User
111    * @tc.level   Level 1
112    */
113  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0300', 0, async function (done) {
114    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0300 starts`);
115
116    let beginIndex = -1;
117    let jsonObj = {
118      type : eventType,
119      bundleName : bundleName,
120      triggerAction : triggerAction,
121      beginIndex : beginIndex,
122    }
123
124    let event = new accessibility.EventInfo(jsonObj);
125
126    accessibility.sendEvent(event).then((result) => {
127      expect(result).assertEqual(undefined);
128      done();
129    }).catch(err => {
130      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0300 has error: ${err}`);
131      expect(null).assertFail();
132      done();
133    });
134  })
135
136
137  /*
138    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0400
139    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_0400
140    * @tc.desc    The bundleName of EventInfo is 'com.ixaa.testfora11y', test sendEvent() function
141    *             The result of sendEvent() should be equal to a promise of undefined
142    *             Another test point is to test whether the modified constructor (EventInfo)
143    *             works correctly.
144    * @tc.size    SmallTest
145    * @tc.type    User
146    * @tc.level   Level 1
147    */
148  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0400', 0, async function (done) {
149    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0400 starts`);
150
151    let localBundleName = 'com.ixaa.testfora11y';
152    let jsonObj = {
153      type : eventType,
154      bundleName : localBundleName,
155      triggerAction : triggerAction,
156    }
157
158    let event = new accessibility.EventInfo(jsonObj);
159
160    accessibility.sendEvent(event).then((result) => {
161      expect(result).assertEqual(undefined);
162      done();
163    }).catch(err => {
164      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0400 has error: ${err}`);
165      expect(null).assertFail();
166      done();
167    });
168  })
169
170  /*
171    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0500
172    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_0500
173    * @tc.desc    The bundleName of EventInfo is '', test sendEvent() function
174    *             The result of sendEvent() should be equal to a rejected promise of undefined
175    *             Another test point is to test whether the modified constructor (EventInfo)
176    *             works correctly.
177    * @tc.size    SmallTest
178    * @tc.type    User
179    * @tc.level   Level 1
180    */
181  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0500', 0, async function (done) {
182    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0500 starts`);
183
184    let localBundleName = '';
185    let jsonObj = {
186      type : eventType,
187      bundleName : localBundleName,
188      triggerAction : triggerAction,
189    }
190
191    let event = new accessibility.EventInfo(jsonObj);
192
193    accessibility.sendEvent(event).then((result) =>{
194        console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0500 result ${result}`);
195        expect(null).assertFail();
196        done();
197    }).catch((err) => {
198        console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0500 has error: ${err}`);
199        expect(true).assertTrue();
200        done();
201    });
202  })
203
204  /*
205    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0600
206    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_0600
207    * @tc.desc    The bundleName of EventInfo is null, test sendEvent() function
208    *             The result of sendEvent() should be equal to a rejected promise of undefined
209    *             Another test point is to test whether the modified constructor (EventInfo)
210    *             works correctly.
211    * @tc.size    SmallTest
212    * @tc.type    User
213    * @tc.level   Level 1
214    */
215  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0600', 0, async function (done) {
216    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0600 starts`);
217
218    let localBundleName = null;
219    let jsonObj = {
220      type : eventType,
221      bundleName : localBundleName,
222      triggerAction : triggerAction,
223    }
224
225    let event = new accessibility.EventInfo(jsonObj);
226
227    accessibility.sendEvent(event).then((result) =>{
228        console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0600 result ${result}`);
229        expect(null).assertFail();
230        done();
231    }).catch((err) => {
232        console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0600 has error: ${err}`);
233        expect(true).assertTrue();
234        done();
235    });
236  })
237
238  /*
239    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0700
240    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_0700
241    * @tc.desc    The componentType of EventInfo is 'button', test sendEvent() function
242    *             The result of sendEvent() should be equal to a promise of undefined
243    *             Another test point is to test whether the modified constructor (EventInfo)
244    *             works correctly.
245    * @tc.size    SmallTest
246    * @tc.type    User
247    * @tc.level   Level 1
248    */
249  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0700', 0, async function (done) {
250    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0700 starts`);
251
252    let componentType = 'button';
253    let jsonObj = {
254      type : eventType,
255      bundleName : bundleName,
256      componentType : componentType,
257      triggerAction : triggerAction,
258    }
259
260    let event = new accessibility.EventInfo(jsonObj);
261
262    accessibility.sendEvent(event).then((result) => {
263      expect(result).assertEqual(undefined);
264      done();
265    }).catch(err => {
266      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0700 has error: ${err}`);
267      expect(null).assertFail();
268      done();
269    });
270  })
271
272  /*
273    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0800
274    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_0800
275    * @tc.desc    The componentType of EventInfo is '', test sendEvent() function
276    *             The result of sendEvent() should be equal to a promise of undefined
277    *             Another test point is to test whether the modified constructor (EventInfo)
278    *             works correctly.
279    * @tc.size    SmallTest
280    * @tc.type    User
281    * @tc.level   Level 1
282    */
283  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0800', 0, async function (done) {
284    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0800 starts`);
285
286    let componentType = '';
287    let jsonObj = {
288      type : eventType,
289      bundleName : bundleName,
290      componentType : componentType,
291      triggerAction : triggerAction,
292    }
293
294    let event = new accessibility.EventInfo(jsonObj);
295
296    accessibility.sendEvent(event).then((result) => {
297      expect(result).assertEqual(undefined);
298      done();
299    }).catch(err => {
300      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0800 has error: ${err}`);
301      expect(null).assertFail();
302      done();
303    });
304  })
305
306  /*
307    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0900
308    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_0900
309    * @tc.desc    The componentType of EventInfo is null, test sendEvent() function
310    *             The result of sendEvent() should be equal to a promise of undefined
311    *             Another test point is to test whether the modified constructor (EventInfo)
312    *             works correctly.
313    * @tc.size    SmallTest
314    * @tc.type    User
315    * @tc.level   Level 1
316    */
317  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0900', 0, async function (done) {
318    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0900 starts`);
319
320    let componentType = null;
321    let jsonObj = {
322      type : eventType,
323      bundleName : bundleName,
324      componentType : componentType,
325      triggerAction : triggerAction,
326    }
327
328    let event = new accessibility.EventInfo(jsonObj);
329
330    accessibility.sendEvent(event).then((result) => {
331      expect(result).assertEqual(undefined);
332      done();
333    }).catch(err => {
334      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_0900 has error: ${err}`);
335      expect(null).assertFail();
336      done();
337    });
338  })
339
340  /*
341    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1100
342    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_1100
343    * @tc.desc    The contents of EventInfo is ['1'], test sendEvent() function
344    *             The result of sendEvent() should be equal to a promise of undefined
345    *             Another test point is to test whether the modified constructor (EventInfo)
346    *             works correctly.
347    * @tc.size    SmallTest
348    * @tc.type    User
349    * @tc.level   Level 1
350    */
351  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1100', 0, async function (done) {
352    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1100 starts`);
353
354    let contents = ['1'];
355    let jsonObj = {
356      type : eventType,
357      bundleName : bundleName,
358      triggerAction : triggerAction,
359      contents : contents,
360    }
361
362    let event = new accessibility.EventInfo(jsonObj);
363
364    accessibility.sendEvent(event).then((result) => {
365      expect(result).assertEqual(undefined);
366      done();
367    }).catch(err => {
368      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1100 has error: ${err}`);
369      expect(null).assertFail();
370      done();
371    });
372  })
373
374  /*
375    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1200
376    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_1200
377    * @tc.desc    The contents of EventInfo is [], test sendEvent() function
378    *             The result of sendEvent() should be equal to a promise of undefined
379    *             Another test point is to test whether the modified constructor (EventInfo)
380    *             works correctly.
381    * @tc.size    SmallTest
382    * @tc.type    User
383    * @tc.level   Level 1
384    */
385  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1200', 0, async function (done) {
386    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1200 starts`);
387
388    let contents = [];
389    let jsonObj = {
390      type : eventType,
391      bundleName : bundleName,
392      triggerAction : triggerAction,
393      contents : contents,
394    }
395
396    let event = new accessibility.EventInfo(jsonObj);
397
398    accessibility.sendEvent(event).then((result) => {
399      expect(result).assertEqual(undefined);
400      done();
401    }).catch(err => {
402      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1200 has error: ${err}`);
403      expect(null).assertFail();
404      done();
405    });
406  })
407
408  /*
409      * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1300
410      * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_1300
411      * @tc.desc    The currentIndex of EventInfo is 1, test sendEvent() function
412      *             The result of sendEvent() should be equal to a promise of undefined
413      *             Another test point is to test whether the modified constructor (EventInfo)
414      *             works correctly.
415      * @tc.size    SmallTest
416      * @tc.type    User
417      * @tc.level   Level 1
418      */
419  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1300', 0, async function (done) {
420    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1300 starts`);
421
422    let currentIndex = 1;
423    let jsonObj = {
424      type : eventType,
425      bundleName : bundleName,
426      triggerAction : triggerAction,
427      currentIndex : currentIndex,
428    }
429
430    let event = new accessibility.EventInfo(jsonObj);
431
432    accessibility.sendEvent(event).then((result) => {
433      expect(result).assertEqual(undefined);
434      done();
435    }).catch(err => {
436      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1300 has error: ${err}`);
437      expect(null).assertFail();
438      done();
439    });
440  })
441
442  /*
443    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1400
444    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_1400
445    * @tc.desc    The currentIndex of EventInfo is 0, test sendEvent() function
446    *             The result of sendEvent() should be equal to a promise of undefined
447    * @tc.size    SmallTest
448    * @tc.type    User
449    * @tc.level   Level 1
450    */
451  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1400', 0, async function (done) {
452    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1400 starts`);
453
454    let currentIndex = 0;
455    let jsonObj = {
456      type : eventType,
457      bundleName : bundleName,
458      triggerAction : triggerAction,
459      currentIndex : currentIndex,
460    }
461
462    let event = new accessibility.EventInfo(jsonObj);
463
464    accessibility.sendEvent(event).then((result) => {
465      expect(result).assertEqual(undefined);
466      done();
467    }).catch(err => {
468      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1400 has error: ${err}`);
469      expect(null).assertFail();
470      done();
471    });
472  })
473
474  /*
475    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1500
476    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_1500
477    * @tc.desc    The currentIndex of EventInfo is -1, test sendEvent() function
478    *             The result of sendEvent() should be equal to a promise of undefined
479    *             Another test point is to test whether the modified constructor (EventInfo)
480    *             works correctly.
481    * @tc.size    SmallTest
482    * @tc.type    User
483    * @tc.level   Level 1
484    */
485  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1500', 0, async function (done) {
486    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1500 starts`);
487
488    let currentIndex = -1;
489    let jsonObj = {
490      type : eventType,
491      bundleName : bundleName,
492      triggerAction : triggerAction,
493      currentIndex : currentIndex,
494    }
495
496    let event = new accessibility.EventInfo(jsonObj);
497
498    accessibility.sendEvent(event).then((result) => {
499      expect(result).assertEqual(undefined);
500      done();
501    }).catch(err => {
502      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1500 has error: ${err}`);
503      expect(null).assertFail();
504      done();
505    });
506  })
507
508
509  /*
510    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1600
511    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_1600
512    * @tc.desc    The description of EventInfo is '1', test sendEvent() function
513    *             The result of sendEvent() should be equal to a promise of undefined
514    *             Another test point is to test whether the modified constructor (EventInfo)
515    *             works correctly.
516    * @tc.size    SmallTest
517    * @tc.type    User
518    * @tc.level   Level 1
519    */
520  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1600', 0, async function (done) {
521    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1600 starts`);
522
523    let description = '1';
524    let jsonObj = {
525      type : eventType,
526      bundleName : bundleName,
527      description : description,
528      triggerAction : triggerAction,
529    }
530
531    let event = new accessibility.EventInfo(jsonObj);
532
533    accessibility.sendEvent(event).then((result) => {
534      expect(result).assertEqual(undefined);
535      done();
536    }).catch(err => {
537      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1600 has error: ${err}`);
538      expect(null).assertFail();
539      done();
540    });
541  })
542
543  /*
544    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1700
545    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_1700
546    * @tc.desc    The description of EventInfo is '', test sendEvent() function
547    *             The result of sendEvent() should be equal to a promise of undefined
548    *             Another test point is to test whether the modified constructor (EventInfo)
549    *             works correctly.
550    * @tc.size    SmallTest
551    * @tc.type    User
552    * @tc.level   Level 1
553    */
554  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1700', 0, async function (done) {
555    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1700 starts`);
556
557    let description = '';
558    let jsonObj = {
559      type : eventType,
560      bundleName : bundleName,
561      description : description,
562      triggerAction : triggerAction,
563    }
564
565    let event = new accessibility.EventInfo(jsonObj);
566
567    accessibility.sendEvent(event).then((result) => {
568      expect(result).assertEqual(undefined);
569      done();
570    }).catch(err => {
571      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1700 has error: ${err}`);
572      expect(null).assertFail();
573      done();
574    });
575  })
576
577  /*
578    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1800
579    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_1800
580    * @tc.desc    The description of EventInfo is null, test sendEvent() function
581    *             The result of sendEvent() should be equal to a promise of undefined
582    *             Another test point is to test whether the modified constructor (EventInfo)
583    *             works correctly.
584    * @tc.size    SmallTest
585    * @tc.type    User
586    * @tc.level   Level 1
587    */
588  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1800', 0, async function (done) {
589    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1800 starts`);
590
591    let description = null;
592    let jsonObj = {
593      type : eventType,
594      bundleName : bundleName,
595      description : description,
596      triggerAction : triggerAction,
597    }
598
599    let event = new accessibility.EventInfo(jsonObj);
600
601    accessibility.sendEvent(event).then((result) => {
602      expect(result).assertEqual(undefined);
603      done();
604    }).catch(err => {
605      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1800 has error: ${err}`);
606      expect(null).assertFail();
607      done();
608    });
609  })
610
611
612  /*
613      * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1900
614      * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_1900
615      * @tc.desc    The endIndex of EventInfo is 1, test sendEvent() function
616      *             The result of sendEvent() should be equal to a promise of undefined
617      *             Another test point is to test whether the modified constructor (EventInfo)
618      *             works correctly.
619      * @tc.size    SmallTest
620      * @tc.type    User
621      * @tc.level   Level 1
622      */
623  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1900', 0, async function (done) {
624    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1900 starts`);
625
626    let endIndex = 1;
627    let jsonObj = {
628      type : eventType,
629      bundleName : bundleName,
630      triggerAction : triggerAction,
631      endIndex : endIndex,
632    }
633
634    let event = new accessibility.EventInfo(jsonObj);
635
636    accessibility.sendEvent(event).then((result) => {
637      expect(result).assertEqual(undefined);
638      done();
639    }).catch(err => {
640      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_1900 has error: ${err}`);
641      expect(null).assertFail();
642      done();
643    });
644  })
645
646  /*
647    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2000
648    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_2000
649    * @tc.desc    The endIndex of EventInfo is 0, test sendEvent() function
650    *             The result of sendEvent() should be equal to a promise of undefined
651    *             Another test point is to test whether the modified constructor (EventInfo)
652    *             works correctly.
653    * @tc.size    SmallTest
654    * @tc.type    User
655    * @tc.level   Level 1
656    */
657  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2000', 0, async function (done) {
658    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2000 starts`);
659
660    let endIndex = 0;
661    let jsonObj = {
662      type : eventType,
663      bundleName : bundleName,
664      triggerAction : triggerAction,
665      endIndex : endIndex,
666    }
667
668    let event = new accessibility.EventInfo(jsonObj);
669
670    accessibility.sendEvent(event).then((result) => {
671      expect(result).assertEqual(undefined);
672      done();
673    }).catch(err => {
674      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2000 has error: ${err}`);
675      expect(null).assertFail();
676      done();
677    });
678  })
679
680  /*
681    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2100
682    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_2100
683    * @tc.desc    The endIndex of EventInfo is -1, test sendEvent() function
684    *             The result of sendEvent() should be equal to a promise of undefined
685    *             Another test point is to test whether the modified constructor (EventInfo)
686    *             works correctly.
687    * @tc.size    SmallTest
688    * @tc.type    User
689    * @tc.level   Level 1
690    */
691  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2100', 0, async function (done) {
692    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2100 starts`);
693
694    let endIndex = -1;
695    let jsonObj = {
696      type : eventType,
697      bundleName : bundleName,
698      triggerAction : triggerAction,
699      endIndex : endIndex,
700    }
701
702    let event = new accessibility.EventInfo(jsonObj);
703
704    accessibility.sendEvent(event).then((result) => {
705      expect(result).assertEqual(undefined);
706      done();
707    }).catch(err => {
708      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2100 has error: ${err}`);
709      expect(null).assertFail();
710      done();
711    });
712  })
713
714  /*
715      * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2200
716      * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_2200
717      * @tc.desc    The itemCount of EventInfo is 1, test sendEvent() function
718      *             The result of sendEvent() should be equal to a promise of undefined
719      *             Another test point is to test whether the modified constructor (EventInfo)
720      *             works correctly.
721      * @tc.size    SmallTest
722      * @tc.type    User
723      * @tc.level   Level 1
724      */
725  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2200', 0, async function (done) {
726    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2200 starts`);
727
728    let itemCount = 1;
729    let jsonObj = {
730      type : eventType,
731      bundleName : bundleName,
732      triggerAction : triggerAction,
733      itemCount : itemCount,
734    }
735
736    let event = new accessibility.EventInfo(jsonObj);
737
738    accessibility.sendEvent(event).then((result) => {
739      expect(result).assertEqual(undefined);
740      done();
741    }).catch(err => {
742      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2200 has error: ${err}`);
743      expect(null).assertFail();
744      done();
745    });
746  })
747
748  /*
749    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2300
750    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_2300
751    * @tc.desc    The itemCount of EventInfo is 0, test sendEvent() function
752    *             The result of sendEvent() should be equal to a promise of undefined
753    *             Another test point is to test whether the modified constructor (EventInfo)
754    *             works correctly.
755    * @tc.size    SmallTest
756    * @tc.type    User
757    * @tc.level   Level 1
758    */
759  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2300', 0, async function (done) {
760    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2300 starts`);
761
762    let itemCount = 0;
763    let jsonObj = {
764      type : eventType,
765      bundleName : bundleName,
766      triggerAction : triggerAction,
767      itemCount : itemCount,
768    }
769
770    let event = new accessibility.EventInfo(jsonObj);
771
772    accessibility.sendEvent(event).then((result) => {
773      expect(result).assertEqual(undefined);
774      done();
775    }).catch(err => {
776      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2300 has error: ${err}`);
777      expect(null).assertFail();
778      done();
779    });
780  })
781
782    /*
783    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2400
784    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_2400
785    * @tc.desc    The itemCount of EventInfo is -1, test sendEvent() function
786    *             The result of sendEvent() should be equal to a promise of undefined
787    *             Another test point is to test whether the modified constructor (EventInfo)
788    *             works correctly.
789    * @tc.size    SmallTest
790    * @tc.type    User
791    * @tc.level   Level 1
792    */
793    it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2400', 0, async function (done) {
794      console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2400 starts`);
795
796      let itemCount = -1;
797      let jsonObj = {
798        type : eventType,
799        bundleName : bundleName,
800        triggerAction : triggerAction,
801        itemCount : itemCount,
802      }
803
804      let event = new accessibility.EventInfo(jsonObj);
805
806      accessibility.sendEvent(event).then((result) => {
807        expect(result).assertEqual(undefined);
808        done();
809      }).catch(err => {
810        console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2400 has error: ${err}`);
811        expect(null).assertFail();
812        done();
813      });
814    })
815  /*
816    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2500
817    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_2500
818    * @tc.desc    The lastContent of EventInfo is '1', test sendEvent() function
819    *             The result of sendEvent() should be equal to a promise of undefined
820    *             Another test point is to test whether the modified constructor (EventInfo)
821    *             works correctly.
822    * @tc.size    SmallTest
823    * @tc.type    User
824    * @tc.level   Level 1
825    */
826  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2500', 0, async function (done) {
827    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2500 starts`);
828
829    let lastContent = '1';
830    let jsonObj = {
831      type : eventType,
832      bundleName : bundleName,
833      triggerAction : triggerAction,
834      lastContent : lastContent,
835    }
836
837    let event = new accessibility.EventInfo(jsonObj);
838
839    accessibility.sendEvent(event).then((result) => {
840      expect(result).assertEqual(undefined);
841      done();
842    }).catch(err => {
843      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2500 has error: ${err}`);
844      expect(null).assertFail();
845      done();
846    });
847  })
848
849  /*
850    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2600
851    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_2600
852    * @tc.desc    The lastContent of EventInfo is '', test sendEvent() function
853    *             The result of sendEvent() should be equal to a promise of undefined
854    *             Another test point is to test whether the modified constructor (EventInfo)
855    *             works correctly.
856    * @tc.size    SmallTest
857    * @tc.type    User
858    * @tc.level   Level 1
859    */
860  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2600', 0, async function (done) {
861    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2600 starts`);
862
863    let lastContent = '';
864    let jsonObj = {
865      type : eventType,
866      bundleName : bundleName,
867      triggerAction : triggerAction,
868      lastContent : lastContent,
869    }
870
871    let event = new accessibility.EventInfo(jsonObj);
872
873    accessibility.sendEvent(event).then((result) => {
874      expect(result).assertEqual(undefined);
875      done();
876    }).catch(err => {
877      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2600 has error: ${err}`);
878      expect(null).assertFail();
879      done();
880    });
881  })
882
883  /*
884    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2700
885    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_2700
886    * @tc.desc    The lastContent of EventInfo is null, test sendEvent() function
887    *             The result of sendEvent() should be equal to a promise of undefined
888    *             Another test point is to test whether the modified constructor (EventInfo)
889    *             works correctly.
890    * @tc.size    SmallTest
891    * @tc.type    User
892    * @tc.level   Level 1
893    */
894  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2700', 0, async function (done) {
895    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2700 starts`);
896
897    let lastContent = null;
898    let jsonObj = {
899      type : eventType,
900      bundleName : bundleName,
901      triggerAction : triggerAction,
902      lastContent : lastContent,
903    }
904
905    let event = new accessibility.EventInfo(jsonObj);
906
907    accessibility.sendEvent(event).then((result) => {
908      expect(result).assertEqual(undefined);
909      done();
910    }).catch(err => {
911      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2700 has error: ${err}`);
912      expect(null).assertFail();
913      done();
914    });
915  })
916
917    /*
918    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2900
919    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_2900
920    * @tc.desc    The parameter input is null, test the sendEvent() function
921    *             The result of sendEvent() should be equal to a rejected promise of undefined
922    * @tc.size    SmallTest
923    * @tc.type    User
924    * @tc.level   Level 1
925    */
926    it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2900', 0, async function (done) {
927        console.info('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2900');
928        let event = null;
929
930        accessibility.sendEvent(event).then((result) => {
931            console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2900 result ${result}`);
932            expect(null).assertFail();
933            done();
934        }).catch((err) => {
935            console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_2900 has error: ${err}`);
936            expect(true).assertTrue();
937            done();
938        });
939    })
940
941  /*
942    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3000
943    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3000
944    * @tc.desc    The pageId of EventInfo is 1, test sendEvent() function
945    *             The result of sendEvent() should be equal to a promise of undefined
946    *             Another test point is to test whether the modified constructor (EventInfo)
947    *             works correctly.
948    * @tc.size    SmallTest
949    * @tc.type    User
950    * @tc.level   Level 1
951    */
952  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3000', 0, async function (done) {
953    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3000 starts`);
954
955    let pageId = 1;
956    let jsonObj = {
957      type : eventType,
958      bundleName : bundleName,
959      pageId : pageId,
960      triggerAction : triggerAction,
961    }
962
963    let event = new accessibility.EventInfo(jsonObj);
964
965    accessibility.sendEvent(event).then((result) => {
966      expect(result).assertEqual(undefined);
967      done();
968    }).catch(err => {
969      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3000 has error: ${err}`);
970      expect(null).assertFail();
971      done();
972    });
973  })
974
975  /*
976    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3100
977    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3100
978    * @tc.desc    The pageId of EventInfo is 0, test sendEvent() function
979    *             The result of sendEvent() should be equal to a promise of undefined
980    *             Another test point is to test whether the modified constructor (EventInfo)
981    *             works correctly.
982    * @tc.size    SmallTest
983    * @tc.type    User
984    * @tc.level   Level 1
985    */
986  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3100', 0, async function (done) {
987    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3100 starts`);
988
989    let pageId = 0;
990    let jsonObj = {
991      type : eventType,
992      bundleName : bundleName,
993      pageId : pageId,
994      triggerAction : triggerAction,
995    }
996
997    let event = new accessibility.EventInfo(jsonObj);
998
999    accessibility.sendEvent(event).then((result) => {
1000      expect(result).assertEqual(undefined);
1001      done();
1002    }).catch(err => {
1003      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3100 has error: ${err}`);
1004      expect(null).assertFail();
1005      done();
1006    });
1007  })
1008
1009  /*
1010    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3200
1011    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3200
1012    * @tc.desc    The pageId of EventInfo is -1, test sendEvent() function
1013    *             The result of sendEvent() should be equal to a promise of undefined
1014    *             Another test point is to test whether the modified constructor (EventInfo)
1015    *             works correctly.
1016    * @tc.size    SmallTest
1017    * @tc.type    User
1018    * @tc.level   Level 1
1019    */
1020  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3200', 0, async function (done) {
1021    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3200 starts`);
1022
1023    let pageId = -1;
1024    let jsonObj = {
1025      type : eventType,
1026      bundleName : bundleName,
1027      pageId : pageId,
1028      triggerAction : triggerAction,
1029    }
1030
1031    let event = new accessibility.EventInfo(jsonObj);
1032
1033    accessibility.sendEvent(event).then((result) => {
1034      expect(result).assertEqual(undefined);
1035      done();
1036    }).catch(err => {
1037      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3200 has error: ${err}`);
1038      expect(null).assertFail();
1039      done();
1040    });
1041  })
1042  /*
1043    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3300
1044    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3300
1045    * @tc.desc    The textMoveUnit of EventInfo is 'char', test sendEvent() function
1046    *             The result of sendEvent() should be equal to a promise of undefined
1047    *             Another test point is to test whether the modified constructor (EventInfo)
1048    *             works correctly.
1049    * @tc.size    SmallTest
1050    * @tc.type    User
1051    * @tc.level   Level 1
1052    */
1053  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3300', 0, async function (done) {
1054    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3300 starts`);
1055
1056    let textMoveUnit = 'char';
1057    let jsonObj = {
1058      type : eventType,
1059      bundleName : bundleName,
1060      triggerAction : triggerAction,
1061      textMoveUnit : textMoveUnit,
1062    }
1063
1064    let event = new accessibility.EventInfo(jsonObj);
1065
1066    accessibility.sendEvent(event).then((result) => {
1067      expect(result).assertEqual(undefined);
1068      done();
1069    }).catch(err => {
1070      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3300 has error: ${err}`);
1071      expect(null).assertFail();
1072      done();
1073    });
1074  })
1075
1076  /*
1077    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3400
1078    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3400
1079    * @tc.desc    The textMoveUnit of EventInfo is 'word', test sendEvent() function
1080    *             The result of sendEvent() should be equal to a promise of undefined
1081    *             Another test point is to test whether the modified constructor (EventInfo)
1082    *             works correctly.
1083    * @tc.size    SmallTest
1084    * @tc.type    User
1085    * @tc.level   Level 1
1086    */
1087  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3400', 0, async function (done) {
1088    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3400 starts`);
1089
1090    let textMoveUnit = 'word';
1091    let jsonObj = {
1092      type : eventType,
1093      bundleName : bundleName,
1094      triggerAction : triggerAction,
1095      textMoveUnit : textMoveUnit,
1096    }
1097
1098    let event = new accessibility.EventInfo(jsonObj);
1099
1100    accessibility.sendEvent(event).then((result) => {
1101      expect(result).assertEqual(undefined);
1102      done();
1103    }).catch(err => {
1104      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3400 has error: ${err}`);
1105      expect(null).assertFail();
1106      done();
1107    });
1108  })
1109
1110  /*
1111    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3500
1112    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3500
1113    * @tc.desc    The textMoveUnit of EventInfo is 'line', test sendEvent() function
1114    *             The result of sendEvent() should be equal to a promise of undefined
1115    *             Another test point is to test whether the modified constructor (EventInfo)
1116    *             works correctly.
1117    * @tc.size    SmallTest
1118    * @tc.type    User
1119    * @tc.level   Level 1
1120    */
1121  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3500', 0, async function (done) {
1122    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3500 starts`);
1123
1124    let textMoveUnit = 'line';
1125    let jsonObj = {
1126      type : eventType,
1127      bundleName : bundleName,
1128      triggerAction : triggerAction,
1129      textMoveUnit : textMoveUnit,
1130    }
1131
1132    let event = new accessibility.EventInfo(jsonObj);
1133
1134    accessibility.sendEvent(event).then((result) => {
1135      expect(result).assertEqual(undefined);
1136      done();
1137    }).catch(err => {
1138      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3500 has error: ${err}`);
1139      expect(null).assertFail();
1140      done();
1141    });
1142  })
1143
1144  /*
1145    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3600
1146    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3600
1147    * @tc.desc    The textMoveUnit of EventInfo is 'page', test sendEvent() function
1148    *             The result of sendEvent() should be equal to a promise of undefined
1149    *             Another test point is to test whether the modified constructor (EventInfo)
1150    *             works correctly.
1151    * @tc.size    SmallTest
1152    * @tc.type    User
1153    * @tc.level   Level 1
1154    */
1155  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3600', 0, async function (done) {
1156    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3600 starts`);
1157
1158    let textMoveUnit = 'page';
1159    let jsonObj = {
1160      type : eventType,
1161      bundleName : bundleName,
1162      triggerAction : triggerAction,
1163      textMoveUnit : textMoveUnit,
1164    }
1165
1166    let event = new accessibility.EventInfo(jsonObj);
1167
1168    accessibility.sendEvent(event).then((result) => {
1169      expect(result).assertEqual(undefined);
1170      done();
1171    }).catch(err => {
1172      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3600 has error: ${err}`);
1173      expect(null).assertFail();
1174      done();
1175    });
1176  })
1177
1178  /*
1179    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3700
1180    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3700
1181    * @tc.desc    The textMoveUnit of EventInfo is 'paragraph', test sendEvent() function
1182    *             The result of sendEvent() should be equal to a promise of undefined
1183    *             Another test point is to test whether the modified constructor (EventInfo)
1184    *             works correctly.
1185    * @tc.size    SmallTest
1186    * @tc.type    User
1187    * @tc.level   Level 1
1188    */
1189  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3700', 0, async function (done) {
1190    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3700 starts`);
1191
1192    let textMoveUnit = 'paragraph';
1193    let jsonObj = {
1194      type : eventType,
1195      bundleName : bundleName,
1196      triggerAction : triggerAction,
1197      textMoveUnit : textMoveUnit,
1198    }
1199
1200    let event = new accessibility.EventInfo(jsonObj);
1201
1202    accessibility.sendEvent(event).then((result) => {
1203      expect(result).assertEqual(undefined);
1204      done();
1205    }).catch(err => {
1206      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3700 has error: ${err}`);
1207      expect(null).assertFail();
1208      done();
1209    });
1210  })
1211
1212  /*
1213    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3800
1214    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3800
1215    * @tc.desc    The textMoveUnit of EventInfo is '', test sendEvent() function
1216    *             The result of sendEvent() should be equal to a promise of undefined
1217    *             Another test point is to test whether the modified constructor (EventInfo)
1218    *             works correctly.
1219    * @tc.size    SmallTest
1220    * @tc.type    User
1221    * @tc.level   Level 1
1222    */
1223  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3800', 0, async function (done) {
1224    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3800 starts`);
1225
1226    let textMoveUnit = '';
1227    let jsonObj = {
1228      type : eventType,
1229      bundleName : bundleName,
1230      triggerAction : triggerAction,
1231      textMoveUnit : textMoveUnit,
1232    }
1233
1234    let event = new accessibility.EventInfo(jsonObj);
1235
1236    accessibility.sendEvent(event).then((result) => {
1237      expect(result).assertEqual(undefined);
1238      done();
1239    }).catch(err => {
1240      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3800 has error: ${err}`);
1241      expect(null).assertFail();
1242      done();
1243    });
1244  })
1245
1246  /*
1247    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3900
1248    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_3900
1249    * @tc.desc    The textMoveUnit of EventInfo is null, test sendEvent() function
1250    *             The result of sendEvent() should be equal to a promise of undefined
1251    *             Another test point is to test whether the modified constructor (EventInfo)
1252    *             works correctly.
1253    * @tc.size    SmallTest
1254    * @tc.type    User
1255    * @tc.level   Level 1
1256    */
1257  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3900', 0, async function (done) {
1258    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3900 starts`);
1259
1260    let textMoveUnit = null;
1261    let jsonObj = {
1262      type : eventType,
1263      bundleName : bundleName,
1264      triggerAction : triggerAction,
1265      textMoveUnit : textMoveUnit,
1266    }
1267
1268    let event = new accessibility.EventInfo(jsonObj);
1269
1270    accessibility.sendEvent(event).then((result) => {
1271      expect(result).assertEqual(undefined);
1272      done();
1273    }).catch(err => {
1274      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_3900 has error: ${err}`);
1275      expect(null).assertFail();
1276      done();
1277    });
1278  })
1279  /*
1280    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4000
1281    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4000
1282    * @tc.desc    The triggerAction of EventInfo is 'accessibilityFocus', test sendEvent() function
1283    *             The result of sendEvent() should be equal to a promise of undefined
1284    *             Another test point is to test whether the modified constructor (EventInfo)
1285    *             works correctly.
1286    * @tc.size    SmallTest
1287    * @tc.type    User
1288    * @tc.level   Level 1
1289    */
1290  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4000', 0, async function (done) {
1291    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4000 starts`);
1292
1293    let triggerAction = 'accessibilityFocus';
1294    let jsonObj = {
1295      type : eventType,
1296      bundleName : bundleName,
1297      triggerAction : triggerAction,
1298    }
1299
1300    let event = new accessibility.EventInfo(jsonObj);
1301
1302    accessibility.sendEvent(event).then((result) => {
1303      expect(result).assertEqual(undefined);
1304      done();
1305    }).catch(err => {
1306      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4000 has error: ${err}`);
1307      expect(null).assertFail();
1308      done();
1309    });
1310  })
1311
1312    /*
1313    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4100
1314    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4100
1315    * @tc.desc    The triggerAction of EventInfo is 'clearAccessibilityFocus', test sendEvent() function
1316    *             The result of sendEvent() should be equal to a promise of undefined
1317    *             Another test point is to test whether the modified constructor (EventInfo)
1318    *             works correctly.
1319    * @tc.size    SmallTest
1320    * @tc.type    User
1321    * @tc.level   Level 1
1322    */
1323    it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4100', 0, async function (done) {
1324      console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4100 starts`);
1325
1326      let triggerAction = 'clearAccessibilityFocus';
1327      let jsonObj = {
1328        type : eventType,
1329        bundleName : bundleName,
1330        triggerAction : triggerAction,
1331      }
1332
1333      let event = new accessibility.EventInfo(jsonObj);
1334
1335      accessibility.sendEvent(event).then((result) => {
1336        expect(result).assertEqual(undefined);
1337        done();
1338      }).catch(err => {
1339        console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4100 has error: ${err}`);
1340        expect(null).assertFail();
1341        done();
1342      });
1343    })
1344
1345  /*
1346    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4200
1347    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4200
1348    * @tc.desc    The triggerAction of EventInfo is 'focus', test sendEvent() function
1349    *             The result of sendEvent() should be equal to a promise of undefined
1350    * @tc.size    SmallTest
1351    * @tc.type    User
1352    * @tc.level   Level 1
1353    */
1354  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4200', 0, async function (done) {
1355    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4200 starts`);
1356
1357    let triggerAction = 'focus';
1358    let jsonObj = {
1359      type : eventType,
1360      bundleName : bundleName,
1361      triggerAction : triggerAction,
1362    }
1363
1364    let event = new accessibility.EventInfo(jsonObj);
1365
1366    accessibility.sendEvent(event).then((result) => {
1367      expect(result).assertEqual(undefined);
1368      done();
1369    }).catch(err => {
1370      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4200 has error: ${err}`);
1371      expect(null).assertFail();
1372      done();
1373    });
1374  })
1375
1376  /*
1377    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4300
1378    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4300
1379    * @tc.desc    The triggerAction of EventInfo is 'clearFocus', test sendEvent() function
1380    *             The result of sendEvent() should be equal to a promise of undefined
1381    *             Another test point is to test whether the modified constructor (EventInfo)
1382    *             works correctly.
1383    * @tc.size    SmallTest
1384    * @tc.type    User
1385    * @tc.level   Level 1
1386    */
1387  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4300', 0, async function (done) {
1388    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4300 starts`);
1389
1390    let triggerAction = 'clearFocus';
1391    let jsonObj = {
1392      type : eventType,
1393      bundleName : bundleName,
1394      triggerAction : triggerAction,
1395    }
1396
1397    let event = new accessibility.EventInfo(jsonObj);
1398
1399    accessibility.sendEvent(event).then((result) => {
1400      expect(result).assertEqual(undefined);
1401      done();
1402    }).catch(err => {
1403      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4300 has error: ${err}`);
1404      expect(null).assertFail();
1405      done();
1406    });
1407  })
1408
1409  /*
1410    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4400
1411    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4400
1412    * @tc.desc    The triggerAction of EventInfo is 'clearSelection', test sendEvent() function
1413    *             The result of sendEvent() should be equal to a promise of undefined
1414    *             Another test point is to test whether the modified constructor (EventInfo)
1415    *             works correctly.
1416    * @tc.size    SmallTest
1417    * @tc.type    User
1418    * @tc.level   Level 1
1419    */
1420  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4400', 0, async function (done) {
1421    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4400 starts`);
1422
1423    let triggerAction = 'clearSelection';
1424    let jsonObj = {
1425      type : eventType,
1426      bundleName : bundleName,
1427      triggerAction : triggerAction,
1428    }
1429
1430    let event = new accessibility.EventInfo(jsonObj);
1431
1432    accessibility.sendEvent(event).then((result) => {
1433      expect(result).assertEqual(undefined);
1434      done();
1435    }).catch(err => {
1436      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4400 has error: ${err}`);
1437      expect(null).assertFail();
1438      done();
1439    });
1440  })
1441
1442  /*
1443    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4500
1444    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4500
1445    * @tc.desc    The triggerAction of EventInfo is 'click', test sendEvent() function
1446    *             The result of sendEvent() should be equal to a promise of undefined
1447    *             Another test point is to test whether the modified constructor (EventInfo)
1448    *             works correctly.
1449    * @tc.size    SmallTest
1450    * @tc.type    User
1451    * @tc.level   Level 1
1452    */
1453  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4500', 0, async function (done) {
1454    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4500 starts`);
1455
1456    let triggerAction = 'click';
1457    let jsonObj = {
1458      type : eventType,
1459      bundleName : bundleName,
1460      triggerAction : triggerAction,
1461    }
1462
1463    let event = new accessibility.EventInfo(jsonObj);
1464
1465    accessibility.sendEvent(event).then((result) => {
1466      expect(result).assertEqual(undefined);
1467      done();
1468    }).catch(err => {
1469      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4500 has error: ${err}`);
1470      expect(null).assertFail();
1471      done();
1472    });
1473  })
1474
1475  /*
1476    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4600
1477    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4600
1478    * @tc.desc    The triggerAction of EventInfo is 'longClick', test sendEvent() function
1479    *             The result of sendEvent() should be equal to a promise of undefined
1480    *             Another test point is to test whether the modified constructor (EventInfo)
1481    *             works correctly.
1482    * @tc.size    SmallTest
1483    * @tc.type    User
1484    * @tc.level   Level 1
1485    */
1486  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4600', 0, async function (done) {
1487    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4600 starts`);
1488
1489    let triggerAction = 'longClick';
1490    let jsonObj = {
1491      type : eventType,
1492      bundleName : bundleName,
1493      triggerAction : triggerAction,
1494    }
1495
1496    let event = new accessibility.EventInfo(jsonObj);
1497
1498    accessibility.sendEvent(event).then((result) => {
1499      expect(result).assertEqual(undefined);
1500      done();
1501    }).catch(err => {
1502      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4600 has error: ${err}`);
1503      expect(null).assertFail();
1504      done();
1505    });
1506  })
1507
1508  /*
1509    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4700
1510    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4700
1511    * @tc.desc    The triggerAction of EventInfo is 'cut', test sendEvent() function
1512    *             The result of sendEvent() should be equal to a promise of undefined
1513    *             Another test point is to test whether the modified constructor (EventInfo)
1514    *             works correctly.
1515    * @tc.size    SmallTest
1516    * @tc.type    User
1517    * @tc.level   Level 1
1518    */
1519  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4700', 0, async function (done) {
1520    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4700 starts`);
1521
1522    let triggerAction = 'cut';
1523    let jsonObj = {
1524      type : eventType,
1525      bundleName : bundleName,
1526      triggerAction : triggerAction,
1527    }
1528
1529    let event = new accessibility.EventInfo(jsonObj);
1530
1531    accessibility.sendEvent(event).then((result) => {
1532      expect(result).assertEqual(undefined);
1533      done();
1534    }).catch(err => {
1535      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4700 has error: ${err}`);
1536      expect(null).assertFail();
1537      done();
1538    });
1539  })
1540
1541  /*
1542    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4800
1543    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4800
1544    * @tc.desc    The triggerAction of EventInfo is 'copy', test sendEvent() function
1545    *             The result of sendEvent() should be equal to a promise of undefined
1546    *             Another test point is to test whether the modified constructor (EventInfo)
1547    *             works correctly.
1548    * @tc.size    SmallTest
1549    * @tc.type    User
1550    * @tc.level   Level 1
1551    */
1552  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4800', 0, async function (done) {
1553    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4800 starts`);
1554
1555    let triggerAction = 'copy';
1556    let jsonObj = {
1557      type : eventType,
1558      bundleName : bundleName,
1559      triggerAction : triggerAction,
1560    }
1561
1562    let event = new accessibility.EventInfo(jsonObj);
1563
1564    accessibility.sendEvent(event).then((result) => {
1565      expect(result).assertEqual(undefined);
1566      done();
1567    }).catch(err => {
1568      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4800 has error: ${err}`);
1569      expect(null).assertFail();
1570      done();
1571    });
1572  })
1573
1574  /*
1575    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4900
1576    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_4900
1577    * @tc.desc    The triggerAction of EventInfo is 'paste', test sendEvent() function
1578    *             The result of sendEvent() should be equal to a promise of undefined
1579    *             Another test point is to test whether the modified constructor (EventInfo)
1580    *             works correctly.
1581    * @tc.size    SmallTest
1582    * @tc.type    User
1583    * @tc.level   Level 1
1584    */
1585  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4900', 0, async function (done) {
1586    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4900 starts`);
1587
1588    let triggerAction = 'paste';
1589    let jsonObj = {
1590      type : eventType,
1591      bundleName : bundleName,
1592      triggerAction : triggerAction,
1593    }
1594
1595    let event = new accessibility.EventInfo(jsonObj);
1596
1597    accessibility.sendEvent(event).then((result) => {
1598      expect(result).assertEqual(undefined);
1599      done();
1600    }).catch(err => {
1601      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_4900 has error: ${err}`);
1602      expect(null).assertFail();
1603      done();
1604    });
1605  })
1606
1607  /*
1608    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5000
1609    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5000
1610    * @tc.desc    The triggerAction of EventInfo is 'select', test sendEvent() function
1611    *             The result of sendEvent() should be equal to a promise of undefined
1612    *             Another test point is to test whether the modified constructor (EventInfo)
1613    *             works correctly.
1614    * @tc.size    SmallTest
1615    * @tc.type    User
1616    * @tc.level   Level 1
1617    */
1618  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5000', 0, async function (done) {
1619    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5000 starts`);
1620
1621    let triggerAction = 'select';
1622    let jsonObj = {
1623      type : eventType,
1624      bundleName : bundleName,
1625      triggerAction : triggerAction,
1626    }
1627
1628    let event = new accessibility.EventInfo(jsonObj);
1629
1630    accessibility.sendEvent(event).then((result) => {
1631      expect(result).assertEqual(undefined);
1632      done();
1633    }).catch(err => {
1634      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5000 has error: ${err}`);
1635      expect(null).assertFail();
1636      done();
1637    });
1638  })
1639
1640  /*
1641    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5100
1642    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5100
1643    * @tc.desc    The triggerAction of EventInfo is 'setText', test sendEvent() function
1644    *             The result of sendEvent() should be equal to a promise of undefined
1645    *             Another test point is to test whether the modified constructor (EventInfo)
1646    *             works correctly.
1647    * @tc.size    SmallTest
1648    * @tc.type    User
1649    * @tc.level   Level 1
1650    */
1651  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5100', 0, async function (done) {
1652    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5100 starts`);
1653
1654    let triggerAction = 'setText';
1655    let jsonObj = {
1656      type : eventType,
1657      bundleName : bundleName,
1658      triggerAction : triggerAction,
1659    }
1660
1661    let event = new accessibility.EventInfo(jsonObj);
1662
1663    accessibility.sendEvent(event).then((result) => {
1664      expect(result).assertEqual(undefined);
1665      done();
1666    }).catch(err => {
1667      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5100 has error: ${err}`);
1668      expect(null).assertFail();
1669      done();
1670    });
1671  })
1672
1673  /*
1674    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5200
1675    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5200
1676    * @tc.desc    The triggerAction of EventInfo is 'delete', test sendEvent() function
1677    *             The result of sendEvent() should be equal to a promise of undefined
1678    *             Another test point is to test whether the modified constructor (EventInfo)
1679    *             works correctly.
1680    * @tc.size    SmallTest
1681    * @tc.type    User
1682    * @tc.level   Level 1
1683    */
1684  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5200', 0, async function (done) {
1685    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5200 starts`);
1686
1687    let triggerAction = 'delete';
1688    let jsonObj = {
1689      type : eventType,
1690      bundleName : bundleName,
1691      triggerAction : triggerAction,
1692    }
1693
1694    let event = new accessibility.EventInfo(jsonObj);
1695
1696    accessibility.sendEvent(event).then((result) => {
1697      expect(result).assertEqual(undefined);
1698      done();
1699    }).catch(err => {
1700      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5200 has error: ${err}`);
1701      expect(null).assertFail();
1702      done();
1703    });
1704  })
1705
1706  /*
1707    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5300
1708    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5300
1709    * @tc.desc    The triggerAction of EventInfo is 'scrollForward', test sendEvent() function
1710    *             The result of sendEvent() should be equal to a promise of undefined
1711    *             Another test point is to test whether the modified constructor (EventInfo)
1712    *             works correctly.
1713    * @tc.size    SmallTest
1714    * @tc.type    User
1715    * @tc.level   Level 1
1716    */
1717  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5300', 0, async function (done) {
1718    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5300 starts`);
1719
1720    let triggerAction = 'scrollForward';
1721    let jsonObj = {
1722      type : eventType,
1723      bundleName : bundleName,
1724      triggerAction : triggerAction,
1725    }
1726
1727    let event = new accessibility.EventInfo(jsonObj);
1728
1729    accessibility.sendEvent(event).then((result) => {
1730      expect(result).assertEqual(undefined);
1731      done();
1732    }).catch(err => {
1733      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5300 has error: ${err}`);
1734      expect(null).assertFail();
1735      done();
1736    });
1737  })
1738
1739  /*
1740    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5400
1741    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5400
1742    * @tc.desc    The triggerAction of EventInfo is 'scrollBackward', test sendEvent() function
1743    *             The result of sendEvent() should be equal to a promise of undefined
1744    *             Another test point is to test whether the modified constructor (EventInfo)
1745    *             works correctly.
1746    * @tc.size    SmallTest
1747    * @tc.type    User
1748    * @tc.level   Level 1
1749    */
1750  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5400', 0, async function (done) {
1751    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5400 starts`);
1752
1753    let triggerAction = 'scrollBackward';
1754    let jsonObj = {
1755      type : eventType,
1756      bundleName : bundleName,
1757      triggerAction : triggerAction,
1758    }
1759
1760    let event = new accessibility.EventInfo(jsonObj);
1761
1762    accessibility.sendEvent(event).then((result) => {
1763      expect(result).assertEqual(undefined);
1764      done();
1765    }).catch(err => {
1766      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5400 has error: ${err}`);
1767      expect(null).assertFail();
1768      done();
1769    });
1770  })
1771
1772  /*
1773    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5500
1774    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5500
1775    * @tc.desc    The triggerAction of EventInfo is 'setSelection', test sendEvent() function
1776    *             The result of sendEvent() should be equal to a promise of undefined
1777    *             Another test point is to test whether the modified constructor (EventInfo)
1778    *             works correctly.
1779    * @tc.size    SmallTest
1780    * @tc.type    User
1781    * @tc.level   Level 1
1782    */
1783  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5500', 0, async function (done) {
1784    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5500 starts`);
1785
1786    let triggerAction = 'setSelection';
1787    let jsonObj = {
1788      type : eventType,
1789      bundleName : bundleName,
1790      triggerAction : triggerAction,
1791    }
1792
1793    let event = new accessibility.EventInfo(jsonObj);
1794
1795    accessibility.sendEvent(event).then((result) => {
1796      expect(result).assertEqual(undefined);
1797      done();
1798    }).catch(err => {
1799      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5500 has error: ${err}`);
1800      expect(null).assertFail();
1801      done();
1802    });
1803  })
1804
1805  /*
1806    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5600
1807    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5600
1808    * @tc.desc    The triggerAction of EventInfo is '', test sendEvent() function
1809    *             The result of sendEvent() should be equal to a rejected promise of undefined
1810    *             Another test point is to test whether the modified constructor (EventInfo)
1811    *             works correctly.
1812    * @tc.size    SmallTest
1813    * @tc.type    User
1814    * @tc.level   Level 1
1815    */
1816  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5600', 0, async function (done) {
1817    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5600 starts`);
1818
1819    let triggerAction = '';
1820    let jsonObj = {
1821      type : eventType,
1822      bundleName : bundleName,
1823      triggerAction : triggerAction,
1824    }
1825
1826    let event = new accessibility.EventInfo(jsonObj);
1827
1828    accessibility.sendEvent(event).then((result) =>{
1829        console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5600 result ${result}`);
1830        expect(null).assertFail();
1831        done();
1832    }).catch((err) => {
1833        console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5600 has error: ${err}`);
1834        expect(true).assertTrue();
1835        done();
1836    });
1837  })
1838
1839  /*
1840    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5700
1841    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5700
1842    * @tc.desc    The triggerAction of EventInfo is null, test sendEvent() function
1843    *             The result of sendEvent() should be equal to a rejected promise of undefined
1844    *             Another test point is to test whether the modified constructor (EventInfo)
1845    *             works correctly.
1846    * @tc.size    SmallTest
1847    * @tc.type    User
1848    * @tc.level   Level 1
1849    */
1850  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5700', 0, async function (done) {
1851    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5700 starts`);
1852
1853    let triggerAction = null;
1854    let jsonObj = {
1855      type : eventType,
1856      bundleName : bundleName,
1857      triggerAction : triggerAction,
1858    }
1859
1860    let event = new accessibility.EventInfo(jsonObj);
1861
1862    accessibility.sendEvent(event).then((result) =>{
1863        console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5700 result ${result}`);
1864        expect(null).assertFail();
1865        done();
1866    }).catch((err) => {
1867        console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5700 has error: ${err}`);
1868        expect(true).assertTrue();
1869        done();
1870    });
1871  })
1872
1873  /*
1874    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5800
1875    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5800
1876    * @tc.desc    The type of EventInfo is 'accessibilityFocus', test sendEvent() function
1877    *             The result of sendEvent() should be equal to a promise of undefined
1878    *             Another test point is to test whether the modified constructor (EventInfo)
1879    *             works correctly.
1880    * @tc.size    SmallTest
1881    * @tc.type    User
1882    * @tc.level   Level 1
1883    */
1884  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5800', 0, async function (done) {
1885    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5800 starts`);
1886
1887    let eventType = 'accessibilityFocus';
1888
1889    let jsonObj = {
1890      type : eventType,
1891      bundleName : bundleName,
1892      triggerAction : triggerAction,
1893    }
1894
1895    let event = new accessibility.EventInfo(jsonObj);
1896
1897    accessibility.sendEvent(event).then((result) => {
1898      expect(result).assertEqual(undefined);
1899      done();
1900    }).catch(err => {
1901      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5800 has error: ${err}`);
1902      expect(null).assertFail();
1903      done();
1904    });
1905  })
1906
1907  /*
1908    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5900
1909    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_5900
1910    * @tc.desc    The type of EventInfo is 'accessibilityFocusClear', test sendEvent() function
1911    *             The result of sendEvent() should be equal to a promise of undefined
1912    *             Another test point is to test whether the modified constructor (EventInfo)
1913    *             works correctly.
1914    * @tc.size    SmallTest
1915    * @tc.type    User
1916    * @tc.level   Level 1
1917    */
1918  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5900', 0, async function (done) {
1919    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5900 starts`);
1920
1921    let eventType = 'accessibilityFocusClear';
1922
1923    let jsonObj = {
1924      type : eventType,
1925      bundleName : bundleName,
1926      triggerAction : triggerAction,
1927    }
1928
1929    let event = new accessibility.EventInfo(jsonObj);
1930
1931    accessibility.sendEvent(event).then((result) => {
1932      expect(result).assertEqual(undefined);
1933      done();
1934    }).catch(err => {
1935      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_5900 has error: ${err}`);
1936      expect(null).assertFail();
1937      done();
1938    });
1939  })
1940
1941  /*
1942    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6000
1943    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6000
1944    * @tc.desc    The type of EventInfo is 'click', test sendEvent() function
1945    *             The result of sendEvent() should be equal to a promise of undefined
1946    *             Another test point is to test whether the modified constructor (EventInfo)
1947    *             works correctly.
1948    * @tc.size    SmallTest
1949    * @tc.type    User
1950    * @tc.level   Level 1
1951    */
1952  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6000', 0, async function (done) {
1953    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6000 starts`);
1954
1955    let eventType = 'click';
1956
1957    let jsonObj = {
1958      type : eventType,
1959      bundleName : bundleName,
1960      triggerAction : triggerAction,
1961    }
1962
1963    let event = new accessibility.EventInfo(jsonObj);
1964
1965    accessibility.sendEvent(event).then((result) => {
1966      expect(result).assertEqual(undefined);
1967      done();
1968    }).catch(err => {
1969      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6000 has error: ${err}`);
1970      expect(null).assertFail();
1971      done();
1972    });
1973  })
1974
1975  /*
1976    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6100
1977    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6100
1978    * @tc.desc    The type of EventInfo is 'longClick', test sendEvent() function
1979    *             The result of sendEvent() should be equal to a promise of undefined
1980    *             Another test point is to test whether the modified constructor (EventInfo)
1981    *             works correctly.
1982    * @tc.size    SmallTest
1983    * @tc.type    User
1984    * @tc.level   Level 1
1985    */
1986  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6100', 0, async function (done) {
1987    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6100 starts`);
1988
1989    let eventType = 'longClick';
1990
1991    let jsonObj = {
1992      type : eventType,
1993      bundleName : bundleName,
1994      triggerAction : triggerAction,
1995    }
1996
1997    let event = new accessibility.EventInfo(jsonObj);
1998
1999    accessibility.sendEvent(event).then((result) => {
2000      expect(result).assertEqual(undefined);
2001      done();
2002    }).catch(err => {
2003      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6100 has error: ${err}`);
2004      expect(null).assertFail();
2005      done();
2006    });
2007  })
2008
2009  /*
2010    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6200
2011    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6200
2012    * @tc.desc    The type of EventInfo is 'select', test sendEvent() function
2013    *             The result of sendEvent() should be equal to a promise of undefined
2014    *             Another test point is to test whether the modified constructor (EventInfo)
2015    *             works correctly.
2016    * @tc.size    SmallTest
2017    * @tc.type    User
2018    * @tc.level   Level 1
2019    */
2020  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6200', 0, async function (done) {
2021    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6200 starts`);
2022
2023    let eventType = 'select';
2024
2025    let jsonObj = {
2026      type : eventType,
2027      bundleName : bundleName,
2028      triggerAction : triggerAction,
2029    }
2030
2031    let event = new accessibility.EventInfo(jsonObj);
2032
2033    accessibility.sendEvent(event).then((result) => {
2034      expect(result).assertEqual(undefined);
2035      done();
2036    }).catch(err => {
2037      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6200 has error: ${err}`);
2038      expect(null).assertFail();
2039      done();
2040    });
2041  })
2042
2043  /*
2044    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6300
2045    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6300
2046    * @tc.desc    The type of EventInfo is 'hoverEnter', test sendEvent() function
2047    *             The result of sendEvent() should be equal to a promise of undefined
2048    *             Another test point is to test whether the modified constructor (EventInfo)
2049    *             works correctly.
2050    * @tc.size    SmallTest
2051    * @tc.type    User
2052    * @tc.level   Level 1
2053    */
2054  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6300', 0, async function (done) {
2055    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6300 starts`);
2056
2057    let eventType = 'hoverEnter';
2058
2059    let jsonObj = {
2060      type : eventType,
2061      bundleName : bundleName,
2062      triggerAction : triggerAction,
2063    }
2064
2065    let event = new accessibility.EventInfo(jsonObj);
2066
2067    accessibility.sendEvent(event).then((result) => {
2068      expect(result).assertEqual(undefined);
2069      done();
2070    }).catch(err => {
2071      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6300 has error: ${err}`);
2072      expect(null).assertFail();
2073      done();
2074    });
2075  })
2076
2077  /*
2078    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6400
2079    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6400
2080    * @tc.desc    The type of EventInfo is 'hoverExit', test sendEvent() function
2081    *             The result of sendEvent() should be equal to a promise of undefined
2082    *             Another test point is to test whether the modified constructor (EventInfo)
2083    *             works correctly.
2084    * @tc.size    SmallTest
2085    * @tc.type    User
2086    * @tc.level   Level 1
2087    */
2088  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6400', 0, async function (done) {
2089    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6400 starts`);
2090
2091    let eventType = 'hoverExit';
2092
2093    let jsonObj = {
2094      type : eventType,
2095      bundleName : bundleName,
2096      triggerAction : triggerAction,
2097    }
2098
2099    let event = new accessibility.EventInfo(jsonObj);
2100
2101    accessibility.sendEvent(event).then((result) => {
2102      expect(result).assertEqual(undefined);
2103      done();
2104    }).catch(err => {
2105      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6400 has error: ${err}`);
2106      expect(null).assertFail();
2107      done();
2108    });
2109  })
2110
2111  /*
2112    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6500
2113    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6500
2114    * @tc.desc    The type of EventInfo is 'textUpdate', test sendEvent() function
2115    *             The result of sendEvent() should be equal to a promise of undefined
2116    *             Another test point is to test whether the modified constructor (EventInfo)
2117    *             works correctly.
2118    * @tc.size    SmallTest
2119    * @tc.type    User
2120    * @tc.level   Level 1
2121    */
2122  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6500', 0, async function (done) {
2123    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6500 starts`);
2124
2125    let eventType = 'textUpdate';
2126
2127    let jsonObj = {
2128      type : eventType,
2129      bundleName : bundleName,
2130      triggerAction : triggerAction,
2131    }
2132
2133    let event = new accessibility.EventInfo(jsonObj);
2134
2135    accessibility.sendEvent(event).then((result) => {
2136      expect(result).assertEqual(undefined);
2137      done();
2138    }).catch(err => {
2139      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6500 has error: ${err}`);
2140      expect(null).assertFail();
2141      done();
2142    });
2143  })
2144
2145  /*
2146    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6600
2147    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6600
2148    * @tc.desc    The type of EventInfo is 'textSelectionUpdate', test sendEvent() function
2149    *             The result of sendEvent() should be equal to a promise of undefined
2150    *             Another test point is to test whether the modified constructor (EventInfo)
2151    *             works correctly.
2152    * @tc.size    SmallTest
2153    * @tc.type    User
2154    * @tc.level   Level 1
2155    */
2156  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6600', 0, async function (done) {
2157    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6600 starts`);
2158
2159    let eventType = 'textSelectionUpdate';
2160
2161    let jsonObj = {
2162      type : eventType,
2163      bundleName : bundleName,
2164      triggerAction : triggerAction,
2165    }
2166
2167    let event = new accessibility.EventInfo(jsonObj);
2168
2169    accessibility.sendEvent(event).then((result) => {
2170      expect(result).assertEqual(undefined);
2171      done();
2172    }).catch(err => {
2173      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6600 has error: ${err}`);
2174      expect(null).assertFail();
2175      done();
2176    });
2177  })
2178
2179  /*
2180    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6700
2181    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6700
2182    * @tc.desc    The type of EventInfo is 'scroll', test sendEvent() function
2183    *             The result of sendEvent() should be equal to a promise of undefined
2184    *             Another test point is to test whether the modified constructor (EventInfo)
2185    *             works correctly.
2186    * @tc.size    SmallTest
2187    * @tc.type    User
2188    * @tc.level   Level 1
2189    */
2190  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6700', 0, async function (done) {
2191    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6700 starts`);
2192
2193    let eventType = 'scroll';
2194
2195    let jsonObj = {
2196      type : eventType,
2197      bundleName : bundleName,
2198      triggerAction : triggerAction,
2199    }
2200
2201    let event = new accessibility.EventInfo(jsonObj);
2202
2203    accessibility.sendEvent(event).then((result) => {
2204      expect(result).assertEqual(undefined);
2205      done();
2206    }).catch(err => {
2207      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6700 has error: ${err}`);
2208      expect(null).assertFail();
2209      done();
2210    });
2211  })
2212
2213  /*
2214    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6800
2215    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6800
2216    * @tc.desc    The type of EventInfo is '', test sendEvent() function
2217    *             The result of sendEvent() should be equal to a rejected promise of undefined
2218    *             Another test point is to test whether the modified constructor (EventInfo)
2219    *             works correctly.
2220    * @tc.size    SmallTest
2221    * @tc.type    User
2222    * @tc.level   Level 1
2223    */
2224  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6800', 0, async function (done) {
2225    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6800 starts`);
2226
2227    let eventType = '';
2228
2229    let jsonObj = {
2230      type : eventType,
2231      bundleName : bundleName,
2232      triggerAction : triggerAction,
2233    }
2234
2235    let event = new accessibility.EventInfo(jsonObj);
2236
2237    accessibility.sendEvent(event).then((result) =>{
2238        console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6800 result ${result}`);
2239        expect(null).assertFail();
2240        done();
2241    }).catch((err) => {
2242        console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6800 has error: ${err}`);
2243        expect(true).assertTrue();
2244        done();
2245    });
2246  })
2247
2248  /*
2249    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6900
2250    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_6900
2251    * @tc.desc    The type of EventInfo is null, test sendEvent() function
2252    *             The result of sendEvent() should be equal to a rejected promise of undefined
2253    *             Another test point is to test whether the modified constructor (EventInfo)
2254    *             works correctly.
2255    * @tc.size    SmallTest
2256    * @tc.type    User
2257    * @tc.level   Level 1
2258    */
2259  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6900', 0, async function (done) {
2260    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6900 starts`);
2261
2262    let eventType = null;
2263
2264    let jsonObj = {
2265      type : eventType,
2266      bundleName : bundleName,
2267      triggerAction : triggerAction,
2268    }
2269
2270    let event = new accessibility.EventInfo(jsonObj);
2271
2272    accessibility.sendEvent(event).then((result) =>{
2273        console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6900 result ${result}`);
2274        expect(null).assertFail();
2275        done();
2276    }).catch((err) => {
2277        console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_6900 has error: ${err}`);
2278        expect(true).assertTrue();
2279        done();
2280    });
2281  })
2282
2283  /*
2284    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7000
2285    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_7000
2286    * @tc.desc    The windowUpdateType of EventInfo is '', test sendEvent() function
2287    *             The result of sendEvent() should be equal to a promise of undefined
2288    *             Another test point is to test whether the modified constructor (EventInfo)
2289    *             works correctly.
2290    * @tc.size    SmallTest
2291    * @tc.type    User
2292    * @tc.level   Level 1
2293    */
2294   it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7000', 0, async function (done) {
2295    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7000 starts`);
2296
2297    let windowUpdateType = 'add';
2298    let jsonObj = {
2299      type : eventType,
2300      windowUpdateType : windowUpdateType,
2301      bundleName : bundleName,
2302      triggerAction : triggerAction,
2303    }
2304
2305    let event = new accessibility.EventInfo(jsonObj);
2306
2307    accessibility.sendEvent(event).then((result) => {
2308      expect(result).assertEqual(undefined);
2309      done();
2310    }).catch(err => {
2311      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7000 has error: ${err}`);
2312      expect(null).assertFail();
2313      done();
2314    });
2315  })
2316
2317  /*
2318    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7100
2319    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_7100
2320    * @tc.desc    The windowUpdateType of EventInfo is '', test sendEvent() function
2321    *             The result of sendEvent() should be equal to a promise of undefined
2322    *             Another test point is to test whether the modified constructor (EventInfo)
2323    *             works correctly.
2324    * @tc.size    SmallTest
2325    * @tc.type    User
2326    * @tc.level   Level 1
2327    */
2328  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7100', 0, async function (done) {
2329    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7100 starts`);
2330
2331    let windowUpdateType = '';
2332    let jsonObj = {
2333      type : eventType,
2334      windowUpdateType : windowUpdateType,
2335      bundleName : bundleName,
2336      triggerAction : triggerAction,
2337    }
2338
2339    let event = new accessibility.EventInfo(jsonObj);
2340
2341    accessibility.sendEvent(event).then((result) => {
2342      expect(result).assertEqual(undefined);
2343      done();
2344    }).catch(err => {
2345      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7100 has error: ${err}`);
2346      expect(null).assertFail();
2347      done();
2348    });
2349  })
2350
2351  /*
2352    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7200
2353    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_7200
2354    * @tc.desc    The windowUpdateType of EventInfo is null, test sendEvent() function
2355    *             The result of sendEvent() should be equal to a promise of undefined
2356    *             Another test point is to test whether the modified constructor (EventInfo)
2357    *             works correctly.
2358    * @tc.size    SmallTest
2359    * @tc.type    User
2360    * @tc.level   Level 1
2361    */
2362  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7200', 0, async function (done) {
2363    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7200 starts`);
2364
2365    let windowUpdateType = null;
2366    let jsonObj = {
2367      type : eventType,
2368      windowUpdateType : windowUpdateType,
2369      bundleName : bundleName,
2370      triggerAction : triggerAction,
2371    }
2372
2373    let event = new accessibility.EventInfo(jsonObj);
2374
2375    accessibility.sendEvent(event).then((result) => {
2376      expect(result).assertEqual(undefined);
2377      done();
2378    }).catch(err => {
2379      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7200 has error: ${err}`);
2380      expect(null).assertFail();
2381      done();
2382    });
2383  })
2384
2385    /*
2386    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7300
2387    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_7300
2388    * @tc.desc    The typy of EventInfo is requestFocusForAccessibility, The triggerAction of EventInfo is click ,The elementId of EventInfo is 16  test sendEvent() function
2389    *             The result of sendEvent() should be equal to a promise of undefined
2390    *             Another test point is to test whether the modified constructor (EventInfo)
2391    *             works correctly.
2392    * @tc.size    SmallTest
2393    * @tc.type    User
2394    * @tc.level   Level 1
2395    */
2396  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7300', 0, async function (done) {
2397    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7300 starts`);
2398
2399    let typy = 'requestFocusForAccessibility';
2400    let ttriggerAction = 'click';
2401    let elementId = 16;
2402    let jsonObj = {
2403      type : eventType,
2404      bundleName : bundleName,
2405      triggerAction : triggerAction,
2406      elementId : elementId
2407    }
2408
2409    let event = new accessibility.EventInfo(jsonObj);
2410
2411    accessibility.sendEvent(event).then((result) => {
2412      expect(result).assertEqual(undefined);
2413      done();
2414    }).catch(err => {
2415      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7300 has error: ${err}`);
2416      expect(null).assertFail();
2417      done();
2418    });
2419  })
2420
2421   /*
2422   * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7400
2423   * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_7400
2424   * @tc.desc    The typy of EventInfo is announceForAccessibility, The triggerAction of EventInfo is click ,The textAnnouncedForAccessibility of EventInfo is test123  test sendEvent() function
2425   *             The result of sendEvent() should be equal to a promise of undefined
2426   *             Another test point is to test whether the modified constructor (EventInfo)
2427   *             works correctly.
2428   * @tc.size    SmallTest
2429   * @tc.type    User
2430   * @tc.level   Level 1
2431   */
2432  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7400', 0, async function (done) {
2433    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7400 starts`);
2434
2435    let typy = 'announceForAccessibility';
2436    let ttriggerAction = 'click';
2437    let textAnnouncedForAccessibility = "test123";
2438    let jsonObj = {
2439      type : eventType,
2440      bundleName : bundleName,
2441      triggerAction : triggerAction,
2442      textAnnouncedForAccessibility : textAnnouncedForAccessibility
2443    }
2444
2445    let event = new accessibility.EventInfo(jsonObj);
2446
2447    accessibility.sendEvent(event).then((result) => {
2448      expect(result).assertEqual(undefined);
2449      done();
2450    }).catch(err => {
2451      console.error(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7400 has error: ${err}`);
2452      expect(null).assertFail();
2453      done();
2454    });
2455  })
2456
2457
2458
2459    /*
2460    * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7500
2461    * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_7500
2462    * @tc.desc    The typy of EventInfo is requestFocusForAccessibility, The triggerAction of EventInfo is click ,The elementId of EventInfo is 16  test sendEvent() function
2463    *             The result of sendEvent() should be equal to a Callback of undefined
2464    *             Another test point is to test whether the modified constructor (EventInfo)
2465    *             works correctly.
2466    * @tc.size    SmallTest
2467    * @tc.type    User
2468    * @tc.level   Level 1
2469    */
2470  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7500', 0, async function (done) {
2471    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7500 starts`);
2472
2473    let typy = 'requestFocusForAccessibility';
2474    let ttriggerAction = 'click';
2475    let elementId = 16;
2476    let jsonObj = {
2477      type : eventType,
2478      bundleName : bundleName,
2479      triggerAction : triggerAction,
2480      elementId : elementId
2481    }
2482
2483    let event = new accessibility.EventInfo(jsonObj);
2484
2485    accessibility.sendEvent(event, (err, data) => {
2486      console.log("AccessibilitySendAccessibilityEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7500 err : " + JSON.stringify(err));
2487      if (err && err.code != 0) {
2488        console.error(`AccessibilitySendAccessibilityEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7500: has error: ${err.code}`);
2489        expect(null).assertFail();
2490      } else {
2491        expect(data).assertEqual(undefined);
2492      }
2493      done();
2494    })
2495
2496  })
2497
2498   /*
2499   * @tc.number  SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7600
2500   * @tc.name    test_sUB_bASIC_bARRIERFREE_aPI_accessibleSendEvent_7600
2501   * @tc.desc    The typy of EventInfo is announceForAccessibility, The triggerAction of EventInfo is click ,The textAnnouncedForAccessibility of EventInfo is test123  test sendEvent() function
2502   *             The result of sendEvent() should be equal to a Callback of undefined
2503   *             Another test point is to test whether the modified constructor (EventInfo)
2504   *             works correctly.
2505   * @tc.size    SmallTest
2506   * @tc.type    User
2507   * @tc.level   Level 1
2508   */
2509  it('SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7600', 0, async function (done) {
2510    console.info(`AccessibleSendEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7600 starts`);
2511
2512    let typy = 'announceForAccessibility';
2513    let ttriggerAction = 'click';
2514    let textAnnouncedForAccessibility = "test123";
2515    let jsonObj = {
2516      type : eventType,
2517      bundleName : bundleName,
2518      triggerAction : triggerAction,
2519      textAnnouncedForAccessibility : textAnnouncedForAccessibility
2520    }
2521
2522    let event = new accessibility.EventInfo(jsonObj);
2523
2524    accessibility.sendEvent(event, (err, data) => {
2525      console.log("AccessibilitySendAccessibilityEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7600 err : " + JSON.stringify(err));
2526      if (err && err.code != 0) {
2527        console.error(`AccessibilitySendAccessibilityEvent: SUB_BASIC_BARRIERFREE_API_AccessibleSendEvent_7600: has error: ${err.code}`);
2528        expect(null).assertFail();
2529      } else {
2530        expect(data).assertEqual(undefined);
2531      }
2532      done();
2533    });
2534  })
2535
2536})
2537}
2538