PasteBoardEtsunitTest.ets 159.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
 * Copyright (C) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// @ts-nocheck
Y
yanglifeng1217 已提交
17
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
import pasteboard from '@ohos.pasteboard'

export default function pasteBoardJEtsunitTest() {
  describe('PasteBoardTest', function () {
    console.info('start################################start');

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_0100
      * @tc.name      Adds PlainTextData
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test1', 0, async function (done) {
Y
yanglifeng1217 已提交
33
      console.info('SUB_pasteBoard_function_JS_API_0100 start');
34 35 36 37 38 39 40 41 42 43 44 45 46 47

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test1: stemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test1: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test1: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test1: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test1: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
48
          console.info('f_test1: Checks there is content in the pasteboard');
49 50
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test1: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
51
            expect(data === true ).assertTrue();
52 53 54 55 56 57 58 59 60 61 62 63 64

            var types = pasteData.getMimeTypes();
            console.info('f_test1: getMimeTypes = ' + types);
            console.info('f_test1: getMimeTypes = ' + typeof (types));
            expect("text/plain").assertEqual(types[0]);

            console.info('f_test1: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test1: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test1: Checks the pasteboard content');
Y
yanglifeng1217 已提交
65 66
              var primaryText = pasteData1.getPrimaryText();
              expect(primaryText == textData).assertTrue;
67 68 69
              console.info('f_test1: primaryText = ' + primaryText);

              console.info('Checks pasteboard MAX_RECORD_NUM' + pasteboard.MAX_RECORD_NUM);
C
cy7717 已提交
70
              expect(pasteboard.MAX_RECORD_NUM == 512).assertTrue();
71

Y
yanglifeng1217 已提交
72 73 74
              console.info('Checks PasteDataProperty.localOnly');
              var pasteDataProperty = pasteData1.getProperty();
              console.info('Checks: localOnly = ' + pasteDataProperty.localOnly);
75 76 77 78 79 80 81


              console.info('Checks there is a MIMETYPE_TEXT_PLAIN MIME type of data' + pasteboard.MIMETYPE_TEXT_PLAIN);
              console.info('f_test1: getPrimaryMimeType = ' + pasteData1.getPrimaryMimeType());

              console.info('f_test1: SUB_pasteBoard_function_JS_API_0100 end');
              done();
Y
yanglifeng1217 已提交
82
            });
83 84 85
          });
        });
      });
Y
yanglifeng1217 已提交
86
    });
87 88 89 90 91 92 93 94 95 96

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_0200
    * @tc.name      Adds PlainTextData = ''
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test2', 0, async function (done) {
Y
yanglifeng1217 已提交
97
      console.info('f_test2: SUB_pasteBoard_function_JS_API_0200 start');
98 99 100 101 102 103 104 105 106 107 108 109 110 111

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test2: systemPasteboard.clear promise');

        var textData = '';
        console.info('f_test2: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test2: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test2: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test2: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
112
          console.info('f_test2: Checks there is content in the pasteboard');
113 114
          systemPasteboard.hasPasteData().then((data) => {
            console.info('systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
115
            expect(data === true).assertTrue();
116 117 118 119 120

            console.info('f_test2: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test2: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
Y
yanglifeng1217 已提交
121 122
              var PrimaryText = pasteData1.getPrimaryText();
              expect(PrimaryText ==textData ).assertTrue;
123 124 125 126 127 128
              var recordCount = pasteData1.getRecordCount();
              console.info('f_test2: recordCount=' + recordCount);
              expect(recordCount == 1).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_0200 end');
              done();
Y
yanglifeng1217 已提交
129
            });
130 131 132
          });
        });
      });
Y
yanglifeng1217 已提交
133
    });
134 135 136 137 138 139 140 141 142 143

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_0300
    * @tc.name      Adds PlainTextData = 'Hello 中国!@#$%^&*()_+{}\?.'
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test3', 0, async function (done) {
Y
yanglifeng1217 已提交
144
      console.info('f_test3: SUB_pasteBoard_function_JS_API_0300 start');
145 146 147 148 149 150 151 152 153 154 155 156 157 158

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test3: systemPasteboard.clear promise');

        var textData = 'Hello 中国!@#$%^&*()_+{}\?.';
        console.info('f_test3: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test3: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test3: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test3: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
159
          console.info('f_test3: Checks there is content in the pasteboard');
160 161
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test3: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
162
            expect(data === true ).assertTrue();
163 164 165 166 167 168 169 170

            console.info('f_test3: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test3: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test3: Checks the pasteboard content');
Y
yanglifeng1217 已提交
171 172
              var primaryText = pasteData1.getPrimaryText();
              expect(primaryText ==textData ).assertTrue;
173 174 175
              console.info('f_test3: primaryText = ' + primaryText);

              console.info('Checks there is a MIMETYPE_TEXT_PLAIN MIME type of data' + pasteboard.MIMETYPE_TEXT_PLAIN);
Y
yanglifeng1217 已提交
176
              expect(pasteData1.hasMimeType(pasteboard.MIMETYPE_TEXT_PLAIN) === true ).assertTrue();
177 178 179

              console.info('SUB_pasteBoard_function_JS_API_0300 end');
              done();
Y
yanglifeng1217 已提交
180
            });
181 182 183
          });
        });
      });
Y
yanglifeng1217 已提交
184
    });
185 186 187 188 189 190 191 192 193 194

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_0400
      * @tc.name      Adds 300K PlainTextData
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test4', 0, async function (done) {
Y
yanglifeng1217 已提交
195
      console.info('SUB_pasteBoard_function_JS_API_0400 start');
196 197 198 199 200

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test4: systemPasteboard.clear promise');

Y
yanglifeng1217 已提交
201
        var textData = '';
202 203
        for (var i = 0; i < 300; i++) {
          textData = textData + "A";
Y
yanglifeng1217 已提交
204
        };
205 206 207 208 209 210 211 212
        console.info('f_test4: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test4: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test4: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test4: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
213
          console.info('f_test4: Checks there is content in the pasteboard');
214 215
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test4: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
216
            expect(data === true ).assertTrue();
217 218 219 220 221 222 223 224

            console.info('f_test4: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test4: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test4: Checks the pasteboard content');
Y
yanglifeng1217 已提交
225 226
              var primaryText = pasteData1.getPrimaryText();
              expect(primaryText ==textData ).assertTrue;
227 228 229
              console.info('f_test4: primaryText = ' + primaryText);

              console.info('Checks there is a MIMETYPE_TEXT_PLAIN MIME type of data' + pasteboard.MIMETYPE_TEXT_PLAIN);
Y
yanglifeng1217 已提交
230
              expect(pasteData1.hasMimeType(pasteboard.MIMETYPE_TEXT_PLAIN) === true ).assertTrue();
231 232 233 234
              expect(pasteData1.getPrimaryMimeType() == pasteboard.MIMETYPE_TEXT_PLAIN).assertTrue();

              console.info('f_test4: SUB_pasteBoard_function_JS_API_0400 end');
              done();
Y
yanglifeng1217 已提交
235
            });
236 237 238
          });
        });
      });
Y
yanglifeng1217 已提交
239
    });
240 241 242 243 244 245 246 247 248 249

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_0500
      * @tc.name      Adds 301K PlainTextData
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test5', 0, async function (done) {
Y
yanglifeng1217 已提交
250
      console.info('SUB_pasteBoard_function_JS_API_0500 start');
251 252 253 254 255

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test5: systemPasteboard.clear promise');

Y
yanglifeng1217 已提交
256
        var textData = '';
257 258
        for (var i = 0; i < 301; i++) {
          textData = textData + "A";
Y
yanglifeng1217 已提交
259
        };
260 261 262 263 264 265 266 267
        console.info('f_test5: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test5: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test5: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test5: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
268
          console.info('f_test5: Checks there is content in the pasteboard');
269 270
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test5: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
271
            expect(data === true ).assertTrue();
272 273 274 275 276 277 278 279

            console.info('f_test5: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test5: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test5: Checks the pasteboard content');
Y
yanglifeng1217 已提交
280 281
              var primaryText = pasteData1.getPrimaryText();
              expect(primaryText ==textData ).assertTrue;
282 283 284
              console.info('f_test5: primaryText = ' + primaryText);

              console.info('Checks there is a MIMETYPE_TEXT_PLAIN MIME type of data' + pasteboard.MIMETYPE_TEXT_PLAIN);
Y
yanglifeng1217 已提交
285
              expect(pasteData1.hasMimeType(pasteboard.MIMETYPE_TEXT_PLAIN) === true ).assertTrue();
286 287 288

              console.info('SUB_pasteBoard_function_JS_API_0500 end');
              done();
Y
yanglifeng1217 已提交
289
            });
290 291 292
          });
        });
      });
Y
yanglifeng1217 已提交
293
    });
294 295 296 297 298 299 300 301 302 303

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_0600
    * @tc.name      Adds htmlText
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test6', 0, async function (done) {
Y
yanglifeng1217 已提交
304
      console.info('SUB_pasteBoard_function_JS_API_0600 start');
305 306 307 308 309

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test6: systemPasteboard.clear promise');

Y
yanglifeng1217 已提交
310
        var htmlText = '<html><head></head><body>Hello World!</body></html>';
311 312 313 314 315 316 317 318
        console.info('f_test6: createHtmlData htmlText = ' + htmlText);
        var pasteData = pasteboard.createHtmlData(htmlText);
        console.info('f_test6: createHtmlData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test6: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test6: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
319
          console.info('f_test6: Checks there is content in the pasteboard');
320 321
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test6: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
322
            expect(data === true ).assertTrue();
323 324 325 326 327 328 329 330

            console.info('f_test6: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test6: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test6: Checks the pasteboard content');
Y
yanglifeng1217 已提交
331
              var primaryHtml = pasteData1.getPrimaryHtml();
332 333 334 335
              console.info('f_test6: getPrimaryHtml = ' + primaryHtml);
              expect(primaryHtml == htmlText).assertTrue();

              console.info('Checks there is a MIMETYPE_TEXT_HTML MIME type of data' + pasteboard.MIMETYPE_TEXT_HTML);
Y
yanglifeng1217 已提交
336
              expect(pasteData1.hasMimeType(pasteboard.MIMETYPE_TEXT_HTML) === true ).assertTrue();
337 338 339 340
              console.info('f_test6: getPrimaryMimeType = ' + pasteData1.getPrimaryMimeType());

              console.info('SUB_pasteBoard_function_JS_API_0600 end');
              done();
Y
yanglifeng1217 已提交
341
            });
342 343 344
          });
        });
      });
Y
yanglifeng1217 已提交
345
    });
346 347 348 349 350 351 352 353 354 355

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_0700
    * @tc.name      Adds htmlText = ''
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test7', 0, async function (done) {
Y
yanglifeng1217 已提交
356
      console.info('f_test7: SUB_pasteBoard_function_JS_API_0700 start');
357 358 359 360 361

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test7: systemPasteboard.clear promise');

Y
yanglifeng1217 已提交
362
        var htmlText = '';
363 364 365 366 367 368 369 370
        console.info('f_test7: createHtmlData htmlText = ' + htmlText);
        var pasteData = pasteboard.createHtmlData(htmlText);
        console.info('f_test7: createHtmlData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test7: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test7: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
371
          console.info('f_test7: Checks there is content in the pasteboard');
372 373
          systemPasteboard.hasPasteData().then((data) => {
            console.info('systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
374
            expect(data === true ).assertTrue();
375 376 377 378 379

            console.info('f_test7: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test7: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
Y
yanglifeng1217 已提交
380 381 382
               var primaryHtml = pasteData1.getPrimaryHtml();
              console.info('f_test7: getPrimaryHtml = ' + primaryHtml);
              expect(primaryHtml == htmlText).assertTrue();
383 384 385 386
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_0700 end');
              done();
Y
yanglifeng1217 已提交
387
            });
388 389 390
          });
        });
      });
Y
yanglifeng1217 已提交
391
    });
392 393 394 395 396 397 398 399 400 401

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_0800
    * @tc.name      Adds htmlText = 'Hello 中国!@#$%^&*()_+{}\?.'
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test8', 0, async function (done) {
Y
yanglifeng1217 已提交
402
      console.info('SUB_pasteBoard_function_JS_API_0800 start');
403 404 405 406 407

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test8: systemPasteboard.clear promise');

Y
yanglifeng1217 已提交
408
        var htmlText = 'Hello 中国!@#$%^&*()_+{}\?.';
409 410 411 412 413 414 415 416
        console.info('f_test8: createHtmlData htmlText = ' + htmlText);
        var pasteData = pasteboard.createHtmlData(htmlText);
        console.info('f_test8: createHtmlData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test8: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test8: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
417
          console.info('f_test8: Checks there is content in the pasteboard');
418 419
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test8: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
420
            expect(data === true ).assertTrue();
421 422 423 424 425

            console.info('f_test8: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test8: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
Y
yanglifeng1217 已提交
426
              expect(pasteData1.getPrimaryHtml() == htmlText).assertTrue();
427 428 429
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('Checks there is a MIMETYPE_TEXT_HTML MIME type of data' + pasteboard.MIMETYPE_TEXT_HTML);
Y
yanglifeng1217 已提交
430
              expect(pasteData1.hasMimeType(pasteboard.MIMETYPE_TEXT_HTML) === true ).assertTrue();
431 432 433

              console.info('SUB_pasteBoard_function_JS_API_0800 end');
              done();
Y
yanglifeng1217 已提交
434
            });
435 436 437
          });
        });
      });
Y
yanglifeng1217 已提交
438
    });
439 440 441 442 443 444 445 446 447 448

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_0900
    * @tc.name      Adds uriText
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test9', 0, async function (done) {
Y
yanglifeng1217 已提交
449
      console.info('SUB_pasteBoard_function_JS_API_0900 start');
450 451 452 453 454

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test9: systemPasteboard.clear promise');

Y
yanglifeng1217 已提交
455
        var uriText = 'https://www.baidu.com/';
456 457 458 459 460 461 462 463
        console.info('f_test9: createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test9: createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test9: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test9: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
464
          console.info('f_test9: Checks there is content in the pasteboard');
465 466
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test9: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
467
            expect(data === true ).assertTrue();
468 469 470 471 472 473 474 475

            console.info('f_test9: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test9: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test9: Checks the pasteboard content');
Y
yanglifeng1217 已提交
476
              var primaryUri = pasteData1.getPrimaryUri();
477 478 479 480
              console.info('f_test9: getPrimaryUri = ' + primaryUri);
              expect(primaryUri == uriText).assertTrue();

              console.info('Checks there is a MIMETYPE_TEXT_URI MIME type of data' + pasteboard.MIMETYPE_TEXT_URI);
Y
yanglifeng1217 已提交
481
              expect(pasteData1.hasMimeType(pasteboard.MIMETYPE_TEXT_URI) === true ).assertTrue();
482 483 484

              console.info('SUB_pasteBoard_function_JS_API_0900 end');
              done();
Y
yanglifeng1217 已提交
485
            });
486 487 488
          });
        });
      });
Y
yanglifeng1217 已提交
489
    });
490 491 492 493 494 495 496 497 498 499

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_1000
    * @tc.name      Adds uriText = ''
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test10', 0, async function (done) {
Y
yanglifeng1217 已提交
500
      console.info('SUB_pasteBoard_function_JS_API_1000 start');
501 502 503 504 505

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test10: systemPasteboard.clear promise');

Y
yanglifeng1217 已提交
506
        var uriText = '';
507 508 509 510 511 512 513 514
        console.info('f_test10: createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test10: createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test10: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test10: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
515
          console.info('f_test10: Checks there is content in the pasteboard');
516 517
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test10: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
518
            expect(data === true ).assertTrue();
519 520 521 522 523

            console.info('f_test10: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test10: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
Y
yanglifeng1217 已提交
524
              expect(pasteData1.getPrimaryUri() == uriText).assertTrue();
525 526 527 528
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_1000 end');
              done();
Y
yanglifeng1217 已提交
529
            });
530 531 532
          });
        });
      });
Y
yanglifeng1217 已提交
533
    });
534 535 536 537 538 539 540 541 542 543

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_1100
    * @tc.name      Set uriText = 'Hello //'
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test11', 0, async function (done) {
Y
yanglifeng1217 已提交
544
      console.info('SUB_pasteBoard_function_JS_API_1100 start');
545 546 547 548 549

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test11: systemPasteboard.clear promise');

Y
yanglifeng1217 已提交
550
        var uriText = 'Hello//';
551 552 553 554 555 556 557 558
        console.info('f_test11: createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test11: createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test11: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test11: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
559
          console.info('f_test11: Checks there is content in the pasteboard');
560 561
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test11: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
562
            expect(data === true ).assertTrue();
563 564 565 566 567

            console.info('f_test11: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test11: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
Y
yanglifeng1217 已提交
568
              expect(pasteData1.getPrimaryUri() == uriText).assertTrue();
569 570 571
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('Checks there is a MIMETYPE_TEXT_URI MIME type of data' + pasteboard.MIMETYPE_TEXT_URI);
Y
yanglifeng1217 已提交
572
              expect(pasteData1.hasMimeType(pasteboard.MIMETYPE_TEXT_URI) === true).assertTrue();
573 574 575

              console.info('SUB_pasteBoard_function_JS_API_1100 end');
              done();
Y
yanglifeng1217 已提交
576
            });
577 578 579
          });
        });
      });
Y
yanglifeng1217 已提交
580
    });
581 582 583 584 585 586 587 588 589 590

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_1200
    * @tc.name      Adds want
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test12', 0, async function (done) {
Y
yanglifeng1217 已提交
591
      console.info('SUB_pasteBoard_function_JS_API_1200 start');
592 593 594 595 596 597 598 599

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test12: systemPasteboard.clear promise');

        var want = {
          bundleName: "com.example.myapplication8",
          abilityName: "com.example.myapplication8.MainAbility"
Y
yanglifeng1217 已提交
600
        };
601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085
        console.info('f_test12: createWantData want.bundleName = ' + want.bundleName);
        console.info('f_test12: createWantData want.bundleName = ' + want.abilityName);


        var pasteData = pasteboard.createWantData(want);

        console.info('f_test12: createWantData pasteData = ' + pasteData);

        console.info('f_test12: createWantData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test12: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test12: systemPasteboard.setPasteData promise');

          console.info('f_test12: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test12: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test12: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test12: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test12: Checks the pasteboard content');
              var primaryWant = pasteData1.getPrimaryWant()
              console.info('f_test12: createWantData want.bundleName = ' + primaryWant.bundleName);
              console.info('f_test12: createWantData want.bundleName = ' + primaryWant.abilityName);
              expect(want.bundleName).assertEqual(primaryWant.bundleName);
              expect(want.abilityName).assertEqual(primaryWant.abilityName);

              console.info('Checks there is a MIMETYPE_TEXT_WANT MIME type of data' + pasteboard.MIMETYPE_TEXT_WANT);
              expect(pasteData1.hasMimeType(pasteboard.MIMETYPE_TEXT_WANT) === true ||
              pasteData1.hasMimeType(pasteboard.MIMETYPE_TEXT_WANT) === false).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_1200 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_1300
      * @tc.name      Adds one record(s)
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test13', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_1300 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test13: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test13: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test13: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test13: systemPasteboard.setPasteData promise');

          console.info('f_test13: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test13: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test13: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test13: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test13: Checks the pasteboard content');
              var recordText = pasteData1.getRecordAt(0).plainText
              console.info('f_test13: recordText = ' + recordText);

              console.info('SUB_pasteBoard_function_JS_API_1300 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_1400
      * @tc.name      Adds 2 record(s)
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test14', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_1400 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test14: systemPasteboard.clear promise');

        var textData0 = 'Hello World!';
        console.info('f_test14: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test14: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData1 = 'Hello World1'
        console.info('f_test14: addTextRecord = ' + textData1)
        pasteData.addTextRecord(textData1)

        console.info('f_test14: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test14: systemPasteboard.setPasteData promise');

          console.info('f_test14: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test14: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test14: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test14: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 2).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_1400 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_1500
      * @tc.name      Adds 15 record(s)
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test15', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_1500 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test15: systemPasteboard.clear promise');

        var textData0 = 'Hello World!';
        console.info('f_test15: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test15: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData = ''
        for (var i = 1; i < 15; i++) {
          textData = 'Hello World'
          textData = textData + i
          console.info('f_test15: addTextRecord = ' + textData)
          pasteData.addTextRecord(textData)
        }

        console.info('f_test15: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test15: systemPasteboard.setPasteData promise');

          console.info('f_test15: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test15: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test15: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test15: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 15).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_1500 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_1600
      * @tc.name      Adds 30 record(s)
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test16', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_1600 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test16: systemPasteboard.clear promise');

        var textData0 = 'Hello World!';
        console.info('f_test16: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test16: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData = ''
        for (var i = 1; i < 30; i++) {
          textData = 'Hello World'
          textData = textData + i
          console.info('f_test16: addTextRecord = ' + textData)
          pasteData.addTextRecord(textData)
        }

        console.info('f_test16: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test16: systemPasteboard.setPasteData promise');

          console.info('f_test16: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test16: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test16: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test16: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 30).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_1600 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_1700
      * @tc.name      Adds 31 record(s)
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test17', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_1700 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test17: systemPasteboard.clear promise');

        var textData0 = 'Hello World!';
        console.info('f_test17: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test17: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData = ''
        for (var i = 1; i < 31; i++) {
          textData = 'Hello World'
          textData = textData + i
          console.info('f_test17: addTextRecord = ' + textData)
          pasteData.addTextRecord(textData)
        }

        console.info('f_test17: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test17: systemPasteboard.setPasteData promise');

          console.info('f_test17: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test17: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test17: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test17: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              var recordCount = pasteData1.getRecordCount()
              console.info('f_test17: recordCount = ' + recordCount);
              expect(pasteData1.getRecordCount() == 31).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_1700 end');
              done();
            })
          });
        });
      });
    })

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_1800
    * @tc.name      Adds PlainText,HtmlText,UriText
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test18', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_1800 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test18: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test18: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test18: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var htmlText = '<html><head></head><body>Hello World!</body></html>'
        console.info('f_test18: addHtmlRecord = ' + htmlText)
        pasteData.addHtmlRecord(htmlText)

        var uriText = 'https://www.baidu.com/'
        console.info('f_test18: addUriRecord = ' + uriText)
        pasteData.addUriRecord(uriText)

        var want = {
          bundleName: "com.example.myapplication8",
          abilityName: "com.example.myapplication8.MainAbility"
        }
        console.info('f_test18: addWantRecord = ' + want)
        pasteData.addWantRecord(want)


        console.info('f_test18: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test18: systemPasteboard.setPasteData promise');

          console.info('f_test18: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test18: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test18: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test18: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 4).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_1800 end');
              done();
            })
          });
        });
      });
    })

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_1900
    * @tc.name      Delete one PlainTextData
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test19', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_1900 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test19: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test19: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test19: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test19: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test19: systemPasteboard.setPasteData promise');

          console.info('f_test19: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test19: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test19: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test19: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test19: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('f_test19: Writes PasteData to the pasteboard');
              systemPasteboard.setPasteData(pasteData1).then(() => {
                console.info('f_test19: systemPasteboard.setPasteData promise');

                console.info('f_test19: Checks the number of records');
                systemPasteboard.getPasteData().then((data) => {
                  console.info('f_test19: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                  var pasteData2 = data;
                  var recordCount = pasteData2.getRecordCount();
                  console.info('f_test19: recordCount = ' + recordCount);

                  console.info('SUB_pasteBoard_function_JS_API_1900 end');
                  done();

                });
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2000
      * @tc.name      Delete one htmlText
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test20', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2000 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test20: systemPasteboard.clear promise');

        var htmlText = '<html><head></head><body>Hello World!</body></html>'
        console.info('f_test20: createHtmlData htmlText = ' + htmlText);
        var pasteData = pasteboard.createHtmlData(htmlText);
        console.info('f_test20: createHtmlData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test20: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test20: systemPasteboard.setPasteData promise');

          console.info('f_test20: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test20: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test20: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test20: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test20: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('f_test20: Writes PasteData to the pasteboard');
              systemPasteboard.setPasteData(pasteData1).then(() => {
                console.info('f_test20: systemPasteboard.setPasteData promise');

                console.info('f_test20: Checks the number of records');
                systemPasteboard.getPasteData().then((data) => {
                  console.info('f_test20: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                  var pasteData2 = data;
                  var recordCount = pasteData2.getRecordCount();
                  console.info('f_test20: recordCount = ' + recordCount);

                  console.info('SUB_pasteBoard_function_JS_API_2000 end');
                  done();

                });
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2100
      * @tc.name      Delete one uriText
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test21', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2100 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test21: systemPasteboard.clear promise');

        var uriText = 'https://www.baidu.com/'
        console.info('f_test21: createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test21: createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test21: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test21: systemPasteboard.setPasteData promise');

          console.info('f_test21: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test21: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test21: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test21: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test21: f_test21: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('f_test21: Writes PasteData to the pasteboard');
              systemPasteboard.setPasteData(pasteData1).then(() => {
                console.info('f_test21: systemPasteboard.setPasteData promise');

                console.info('f_test21: Checks the number of records');
                systemPasteboard.getPasteData().then((data) => {
                  console.info('f_test21: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                  var pasteData2 = data;
                  var recordCount = pasteData2.getRecordCount();
                  console.info('f_test21: recordCount = ' + recordCount);

                  console.info('SUB_pasteBoard_function_JS_API_2100 end');
                  done();

                });
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2200
      * @tc.name      Delete one want
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test22', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2200 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test22: systemPasteboard.clear promise');

        var want = {
          bundleName: "com.example.myapplication8",
          abilityName: "com.example.myapplication8.MainAbility"
        }
        console.info('f_test22: createWantData = ' + want)
        var pasteData = pasteboard.createWantData(want);
        console.info('f_test22: createWantData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test22: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test22: systemPasteboard.setPasteData promise');

          console.info('f_test22: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test22: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test22: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test22: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test22: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('f_test22: Writes PasteData to the pasteboard');
              systemPasteboard.setPasteData(pasteData1).then(() => {
                console.info('f_test22: systemPasteboard.setPasteData promise');

                console.info('f_test22: Checks the number of records');
                systemPasteboard.getPasteData().then((data) => {
                  console.info('f_test22: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                  var pasteData2 = data;
                  var recordCount = pasteData2.getRecordCount();
                  console.info('f_test22: recordCount = ' + recordCount);

                  console.info('SUB_pasteBoard_function_JS_API_2200 end');
                  done();

                });
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2300
      * @tc.name      Deletes 300K PlainTextData
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test23', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2300 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test23: systemPasteboard.clear promise');

        var textData = ''
        for (var i = 0; i < 300; i++) {
          textData = textData + "A";
        }
        console.info('f_test23: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test23: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test23: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test23: systemPasteboard.setPasteData promise');

          console.info('f_test23: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test23: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test23: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test23: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test23: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('f_test23: Writes PasteData to the pasteboard');
              systemPasteboard.setPasteData(pasteData1).then(() => {
                console.info('f_test23: systemPasteboard.setPasteData promise');

                console.info('f_test23: Checks the number of records');
                systemPasteboard.getPasteData().then((data) => {
                  console.info('f_test23: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                  var pasteData2 = data;
                  var recordCount = pasteData2.getRecordCount();
                  console.info('f_test23: recordCount = ' + recordCount);

                  console.info('SUB_pasteBoard_function_JS_API_2300 end');
                  done();

                });
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2400
      * @tc.name      Deletes 30 record(s)
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test24', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2400 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test24: systemPasteboard.clear promise');

        var textData0 = 'Hello World'
        console.info('f_test24: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test24: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData = ''
        for (var i = 1; i < 30; i++) {
          textData = 'Hello World'
          textData = textData + i
          pasteData.addTextRecord(textData)
        }

        systemPasteboard.setPasteData(pasteData).then(() => {

          console.info('f_test24: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test24: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test24: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 30).assertTrue();

              console.info('f_test24: Removes the Record')
              for (var i = 0; i < 30; i++) {
                expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();
              }

              systemPasteboard.setPasteData(pasteData1).then(() => {
                console.info('f_test24: systemPasteboard.setPasteData promise');

                systemPasteboard.getPasteData().then((data) => {
                  console.info('f_test24: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                  var pasteData2 = data;
                  var recordCount = pasteData2.getRecordCount();
                  console.info('f_test24: recordCount = ' + recordCount);

                  console.info('SUB_pasteBoard_function_JS_API_2400 end');
                  done();

                });
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2500
      * @tc.name      Deletes replaced record
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test25', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2500 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test25: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test25: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test25: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test25: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test25: systemPasteboard.setPasteData promise');

          console.info('f_test25: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test25: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test25: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test25: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              var textData1 = 'Hello World1'
              console.info('f_test25: Replaces the Record = ' + textData1)
              var pasteDataRecord = pasteboard.createPlainTextRecord(textData1)
              var replace = pasteData1.replaceRecordAt(0, pasteDataRecord);
              console.info('f_test25: replace = ' + replace)

              console.info('f_test25: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('f_test25: Writes PasteData to the pasteboard');
              systemPasteboard.setPasteData(pasteData1).then(() => {
                console.info('f_test25: systemPasteboard.setPasteData promise');

                console.info('f_test25: Checks the number of records');
                systemPasteboard.getPasteData().then((data) => {
                  console.info('f_test25: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                  var pasteData2 = data;
                  var recordCount = pasteData2.getRecordCount();
                  console.info('f_test25: recordCount = ' + recordCount);

                  console.info('SUB_pasteBoard_function_JS_API_2500 end');
                  done();

                });
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2600
      * @tc.name      Deletes 文本urihtml
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test26', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2600 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test26: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test26: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test26: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var htmlText = '<html><head></head><body>Hello World!</body></html>'
        console.info('f_test26: addHtmlRecord = ' + htmlText)
        pasteData.addHtmlRecord(htmlText)

        var uriText = 'https://www.baidu.com/'
        console.info('f_test26: addUriRecord = ' + uriText)
        pasteData.addUriRecord(uriText)

        console.info('f_test26: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test26: systemPasteboard.setPasteData promise');

          console.info('f_test26: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test26: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test26: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test26: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 3).assertTrue();

              console.info('f_test26: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('f_test26: Writes PasteData to the pasteboard');
              systemPasteboard.setPasteData(pasteData1).then(() => {
                console.info('f_test26: systemPasteboard.setPasteData promise');

                console.info('f_test26: Checks the number of records');
                systemPasteboard.getPasteData().then((data) => {
                  console.info('f_test26: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                  var pasteData2 = data;
                  var recordCount = pasteData2.getRecordCount();
                  console.info('f_test26: recordCount = ' + recordCount);

                  console.info('SUB_pasteBoard_function_JS_API_2600 end');
                  done();

                });
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2700
      * @tc.name      Replaces 文本 record
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test27', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2700 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test27: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test27: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test27: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test27: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test27: systemPasteboard.setPasteData promise');

          console.info('f_test27: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test27: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test27: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test27: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              var textData1 = 'Hello World1'
              console.info('f_test27: Replaces the Record = ' + textData1)
              var pasteDataRecord = pasteboard.createPlainTextRecord(textData1)
              var replace = pasteData1.replaceRecordAt(0, pasteDataRecord);
              console.info('f_test27: replace = ' + replace)

              console.info('f_test27: Checks the pasteboard content');
              var primaryText = pasteData1.getPrimaryText();
              console.info('f_test27: primaryText = ' + primaryText);

              console.info('SUB_pasteBoard_function_JS_API_2700 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2800
      * @tc.name      Replaces htmlText record
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test28', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2800 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test28: systemPasteboard.clear promise');

        var htmlText = '<html><head></head><body>Hello World!</body></html>'
        console.info('f_test28: createHtmlData htmlText = ' + htmlText);
        var pasteData = pasteboard.createHtmlData(htmlText);
        console.info('f_test28: createHtmlData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test28: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test28: systemPasteboard.setPasteData promise');

          console.info('f_test28: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test28: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test28: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test28: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              var htmlText1 = '<html><head></head><body>Hello World 1</body></html>'
              console.info('f_test28: Replaces the htmlText = ' + htmlText1)
              var pasteDataRecord = pasteboard.createHtmlTextRecord(htmlText1)
              var replace = pasteData1.replaceRecordAt(0, pasteDataRecord);
              console.info('f_test28: replace = ' + replace)

              console.info('SUB_pasteBoard_function_JS_API_2800 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_2900
      * @tc.name      Replaces uri record
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test29', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_2900 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test29: systemPasteboard.clear promise');

        var uriText = 'https://www.baidu.com/'
        console.info('f_test29: createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test29: createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test29: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test29: systemPasteboard.setPasteData promise');

          console.info('f_test29: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test29: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test29: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test29: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              var uriText1 = 'https://www.baidu.com/1'
              console.info('f_test29: Replaces the uriText = ' + uriText1)
              var pasteDataRecord = pasteboard.createUriRecord(uriText1)
              var replace = pasteData1.replaceRecordAt(0, pasteDataRecord);
              console.info('f_test29: replace = ' + replace)

              console.info('SUB_pasteBoard_function_JS_API_2900 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_3000
      * @tc.name      Replaces want record
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test30', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3000 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test30: systemPasteboard.clear promise');

        var wantText0 = {
          bundleName: "com.example.myapplication3",
          abilityName: "com.example.myapplication3.MainAbility"
        }
        console.info('f_test30: createWantData want = ' + wantText0);
        var pasteData = pasteboard.createWantData(wantText0);
        console.info('f_test30: createWantData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test30: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test30: systemPasteboard.setPasteData promise');

          console.info('f_test30: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test30: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test30: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test30: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              var wantText1 = {
                bundleName: "com.example.myapplication30",
                abilityName: "com.example.myapplication30.MainAbility"
              }
              console.info('f_test30: Replaces the wantText = ' + wantText1)
              var pasteDataRecord = pasteboard.createWantRecord(wantText1)
              var replace = pasteData1.replaceRecordAt(0, pasteDataRecord);
              console.info('f_test30: replace = ' + replace)

              console.info('SUB_pasteBoard_function_JS_API_3000 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_3100
      * @tc.name      Replaces 300k文本 record
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test31', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3100 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test31: systemPasteboard.clear promise');

        var textData = ''
        for (var i = 0; i < 300; i++) {
          textData = textData + "A";
        }
        console.info('f_test31: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test31: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test31: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test31: systemPasteboard.setPasteData promise');

          console.info('f_test31: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test31: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test31: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test31: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              var textData1 = 'Hello World1'
              console.info('f_test31: Replaces the Record = ' + textData1)
              var pasteDataRecord = pasteboard.createPlainTextRecord(textData1)
              var replace = pasteData1.replaceRecordAt(0, pasteDataRecord);
              console.info('f_test31: replace = ' + replace)

              console.info('f_test31: Checks the pasteboard content');
              var primaryText = pasteData1.getPrimaryText();
              console.info('f_test31: primaryText = ' + primaryText);

              console.info('SUB_pasteBoard_function_JS_API_3100 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_3200
      * @tc.name      Adds one record(s), gets record count
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test32', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3200 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test32: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test32: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test32: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test32: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test32: systemPasteboard.setPasteData promise');

          console.info('Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test32: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test32: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test32: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_3200 end');
              done();
            })
          });
        });
      });
    })

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_3300
    * @tc.name      Adds 2 record(s), gets record count
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test33', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3300 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test33: systemPasteboard.clear promise');

        var textData0 = 'Hello World!';
        console.info('f_test33: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test33: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData = ''
        for (var i = 1; i < 2; i++) {
          textData = 'Hello World'
          textData = textData + i
          console.info('f_test33: addTextRecord = ' + textData)
          pasteData.addTextRecord(textData)
        }

        console.info('f_test33: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test33: systemPasteboard.setPasteData promise');

          console.info('f_test33: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test33: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test33: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test33: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 2).assertTrue();

              console.info('SUB_pasteBoard_function_.' + 'JS_API_3300 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_3400
      * @tc.name      Adds 15 record(s), gets record count
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test34', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3400 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test34: systemPasteboard.clear promise');

        var textData0 = 'Hello World!';
        console.info('f_test34: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test34: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData = ''
        for (var i = 1; i < 15; i++) {
          textData = 'Hello World'
          textData = textData + i
          console.info('f_test34: addTextRecord = ' + textData)
          pasteData.addTextRecord(textData)
        }

        console.info('f_test34: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test34: systemPasteboard.setPasteData promise');

          console.info('f_test34: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test34: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test34: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test34: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 15).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_3400 end');
              done();
            })
          });
        });
      });
    })

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_3500
    * @tc.name      Adds 30 record(s), gets record count
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test35', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3500 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test35: systemPasteboard.clear promise');

        var textData0 = 'Hello World!';
        console.info('f_test35: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test35: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData = ''
        for (var i = 1; i < 30; i++) {
          textData = 'Hello World'
          textData = textData + i
          console.info('f_test35: addTextRecord = ' + textData)
          pasteData.addTextRecord(textData)
        }

        console.info('f_test35: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test35: systemPasteboard.setPasteData promise');

          console.info('f_test35: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test35: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test35: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test35: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 30).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_3500 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_3600
      * @tc.name      Adds 31 record(s), gets record count
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test36', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3600 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test36: systemPasteboard.clear promise');

        var textData0 = 'Hello World!';
        console.info('f_test36: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test36: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData = ''
        for (var i = 1; i < 31; i++) {
          textData = 'Hello World'
          textData = textData + i
          console.info('f_test36: addTextRecord = ' + textData)
          pasteData.addTextRecord(textData)
        }

        console.info('f_test36: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test36: systemPasteboard.setPasteData promise');

          console.info('f_test36: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test36: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test36: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test36: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 31).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_3600 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_3700
      * @tc.name      Replaces one record, gets record count
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test37', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3700 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test37: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test37: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test37: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test37: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test37: systemPasteboard.setPasteData promise');

          console.info('f_test37: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test37: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test37: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test37: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              var textData1 = 'Hello World1'
              console.info('f_test37: Replaces the Record = ' + textData1)
              var pasteDataRecord = pasteboard.createPlainTextRecord(textData1)
              var replace = pasteData1.replaceRecordAt(0, pasteDataRecord);
              console.info('f_test37: replace = ' + replace)

              console.info('f_test37: Checks the number of records');
              systemPasteboard.getPasteData().then((data) => {
                console.info('f_test37: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                var pasteData2 = data;
                expect(pasteData2.getRecordCount() == 1).assertTrue();

                console.info('SUB_pasteBoard_function_JS_API_3700 end');
                done();
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_3800
      * @tc.name      Clears pasteBoard, gets record count
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test38', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3800 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test38: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test38: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test38: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test38: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test38: systemPasteboard.setPasteData promise');

          console.info('f_test38: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test38: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test38: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test38: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test38: Clears the pasteBoard')
              systemPasteboard.clear()

              console.info('f_test38: Checks the number of records');
              systemPasteboard.getPasteData().then((data) => {
                console.info('f_test38: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                var pasteData2 = data;
                var recordCount = pasteData2.getRecordCount();
                console.info('f_test38 recordCount = ' + recordCount);

                console.info('SUB_pasteBoard_function_JS_API_3800 end');
                done();
              });
            });
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_3900
      * @tc.name      Adds Property
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
Y
yanglifeng1217 已提交
2086 2087
      it('pasteboard_function_test39', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_3900 start')
2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test39: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test39: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test39: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test39: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test39: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
2102
          console.info('f_test39: Checks there is content in the pasteboard')
2103 2104
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test39: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
2105
            expect(data === true || data === false).assertTrue();
2106 2107 2108 2109 2110 2111 2112

            console.info('f_test39: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test39: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

Y
yanglifeng1217 已提交
2113 2114 2115
              console.info('f_test39: Sets the Property')
              var pasteDataProperty = pasteData1.getProperty()
              console.info('f_test39: timestamp = ' + pasteDataProperty.timestamp)
2116 2117 2118 2119
              let object = {
                bundleName: "pasteBoardJEtsunitTest"
              };
              pasteDataProperty.additions["one"] = object;
Y
yanglifeng1217 已提交
2120 2121
              pasteDataProperty.shareOption = 1;
              pasteData1.setProperty(pasteDataProperty);
2122

Y
yanglifeng1217 已提交
2123
              console.info('f_test39: Checks the Property')
Y
yanglifeng1217 已提交
2124 2125 2126 2127 2128 2129 2130 2131 2132
              systemPasteboard.setPasteData(pasteData1).then(() => {
                systemPasteboard.hasPasteData().then((data) => {
                  expect(data == true).assertTrue();
                  systemPasteboard.getPasteData().then((data) => {
                    var pasteData2 = data;
                    var pasteDataProperty1 = pasteData2.getProperty();
                    expect(pasteDataProperty1.shareOption == 1).assertTrue();
                    console.info('f_test39: timestamp = ' + pasteDataProperty1.timestamp);
                    console.info('f_test39: shareOption = ' + pasteDataProperty1.shareOption);
2133 2134 2135
                    let tag1 = pasteData1.getTag();
                    console.info('f_test39: gettag = ' + tag1);
                    console.info('f_test39: additions = ' + pasteDataProperty1.additions["one"])
Y
yanglifeng1217 已提交
2136 2137 2138 2139 2140 2141

                    console.info('SUB_pasteBoard_function_JS_API_3900 end');
                    done();
                  });
                });
              });
L
lina123456 已提交
2142
            });
2143 2144 2145
          });
        });
      });
Y
yanglifeng1217 已提交
2146
    })
2147 2148 2149 2150 2151 2152 2153 2154 2155 2156

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_4000
      * @tc.name      Set Property's tags
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test40', 0, async function (done) {
Y
yanglifeng1217 已提交
2157
      console.info('SUB_pasteBoard_function_JS_API_4000 start');
2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test40: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test40: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test40: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test40: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test40: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
2172
          console.info('f_test40: Checks there is content in the pasteboard');
2173 2174
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test40: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
2175
            expect(data === true).assertTrue();
2176 2177 2178 2179 2180 2181 2182

            console.info('f_test40: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test40: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

Y
yanglifeng1217 已提交
2183 2184 2185 2186 2187
              console.info('f_test40: Sets the Property');
              var pasteDataProperty = pasteData1.getProperty();
              console.info('f_test40: timestamp = ' + pasteDataProperty.timestamp);
              pasteDataProperty.tag = "Test";
              pasteData1.setProperty(pasteDataProperty);
2188

Y
yanglifeng1217 已提交
2189
              systemPasteboard.setPasteData(pasteData1).then(() => {
Y
yanglifeng1217 已提交
2190
                console.info('Succeeded in setting PasteData.');
Y
yanglifeng1217 已提交
2191
                systemPasteboard.hasPasteData().then((data) => {
Y
yanglifeng1217 已提交
2192 2193
                  console.info(`Succeeded in checking the PasteData. Data: ${data}`);

Y
yanglifeng1217 已提交
2194 2195 2196 2197
                  expect(data == true).assertTrue();
                  systemPasteboard.getPasteData().then((data) => {
                    var pasteData2 = data;
                    var pasteDataProperty1 = pasteData2.getProperty();
L
lina123456 已提交
2198
                    expect(pasteDataProperty1.tag == "Test").assertTrue();
Y
yanglifeng1217 已提交
2199 2200 2201 2202 2203
                    console.info('f_test40: timestamp = ' + pasteDataProperty1.timestamp);
                    console.info('f_test40: tag = ' + pasteDataProperty1.tag);

                    console.info('SUB_pasteBoard_function_JS_API_4000 end');
                    done();
Y
yanglifeng1217 已提交
2204 2205 2206
                  }).catch((err) => {
                    console.info("getPasteData error,error: " + err)
                  })
Y
yanglifeng1217 已提交
2207 2208 2209
                });
              });
            });
2210 2211 2212
          });
        });
      });
Y
yanglifeng1217 已提交
2213
    });
2214 2215 2216 2217 2218 2219 2220 2221 2222 2223

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_4100
    * @tc.name      Clears pasteBoard and check property
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test41', 0, async function (done) {
Y
yanglifeng1217 已提交
2224
      console.info('SUB_pasteBoard_function_JS_API_4100 start');
2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test41: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test41: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test41: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test41: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test41: systemPasteboard.setPasteData promise');

Y
yanglifeng1217 已提交
2239
          console.info('f_test41: Checks there is content in the pasteboard');
2240 2241
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test41: systemPasteboard.hasPasteData promise data = ' + data);
Y
yanglifeng1217 已提交
2242
            expect(data === true ).assertTrue();
2243 2244 2245 2246 2247 2248 2249

            console.info('f_test41: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test41: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

Y
yanglifeng1217 已提交
2250 2251
              console.info('f_test41: Clears the pasteBoard');
              systemPasteboard.clear();
2252

Y
yanglifeng1217 已提交
2253 2254 2255 2256 2257
              console.info('f_test41: Checks the Property');
              var pasteDataProperty1 = pasteData1.getProperty();
              expect(pasteDataProperty1.tag == "").assertTrue();
              console.info('f_test41: timestamp = ' + pasteDataProperty1.timestamp);
              console.info('f_test41: tag = ' + pasteDataProperty1.tag);
2258 2259 2260

              console.info('SUB_pasteBoard_function_JS_API_4100 end');
              done();
Y
yanglifeng1217 已提交
2261
            });
2262 2263 2264
          });
        });
      });
Y
yanglifeng1217 已提交
2265
    });
2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_4200
      * @tc.name      打开内容变化通知功能向剪贴板数据增加删除等文本数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test42', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_4200 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test42: systemPasteboard.clear promise');

        console.info('f_test42: Open the infor for pasteboard content changes')
        systemPasteboard.on('update', contentChanges)

        var textData = 'Hello World!';
        console.info('f_test42: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test42: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test42: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test42: systemPasteboard.setPasteData promise');

          console.info('f_test42: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test42: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test42: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test42: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test42: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_4200 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_4300
      * @tc.name      打开内容变化通知功能向剪贴板数据增加删除等html数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test43', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_4300 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test43: systemPasteboard.clear promise');

        console.info('f_test43: Open the infor for pasteboard content changes')
        systemPasteboard.on('update', contentChanges)

        var htmlText = '<html><head></head><body>Hello World!</body></html>'
        console.info('f_test43: createHtmlData htmlText = ' + htmlText);
        var pasteData = pasteboard.createHtmlData(htmlText);
        console.info('f_test43: createHtmlData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test43: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test43: systemPasteboard.setPasteData promise');

          console.info('f_test43: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test43: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test43: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test43: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test43: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_4300 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_4400
      * @tc.name      打开内容变化通知功能向剪贴板数据增加删除等uri数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test44', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_4400 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test44: systemPasteboard.clear promise');

        console.info('f_test44: Open the infor for pasteboard content changes')
        systemPasteboard.on('update', contentChanges)

        var uriText = 'https://www.baidu.com/'
        console.info('f_test44: createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test44: createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test44: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test44: systemPasteboard.setPasteData promise');

          console.info('f_test44: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test44: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test44: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test44: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test44: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_4400 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_4500
      * @tc.name      打开内容变化通知功能向剪贴板数据增加删除等want数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test45', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_4500 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test45: systemPasteboard.clear promise');

        console.info('f_test45: Open the infor for pasteboard content changes')
        systemPasteboard.on('update', contentChanges)

        var want = {
          bundleName: "com.example.myapplication45",
          abilityName: "com.example.myapplication45.MainAbility"
        }
        console.info('f_test45: createWantData = ' + want)
        var pasteData = pasteboard.createWantData(want);
        console.info('f_test45: createWantData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test45: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test45: systemPasteboard.setPasteData promise');

          console.info('f_test45: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test45: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test45: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test45: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test45: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_4500 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_4600
      * @tc.name      打开内容变化通知功能清除剪切板内容
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test46', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_4600 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test46: systemPasteboard.clear promise');

        console.info('f_test46: Open the infor for pasteboard content changes')
        systemPasteboard.on('update', contentChanges)

        var textData = 'Hello World!';
        console.info('f_test46: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test46: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test46: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test46: systemPasteboard.setPasteData promise');

          console.info('f_test46: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test46: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test46: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test46: Clears the pasteBoard')
              systemPasteboard.clear()

              console.info('SUB_pasteBoard_function_JS_API_4600 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_4700
      * @tc.name      关闭内容变化通知功能向剪贴板数据增加删除等文本数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test47', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_4700 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test47: systemPasteboard.clear promise');

        console.info('f_test47: Close the infor for pasteboard content changes')
        systemPasteboard.off('update', contentChanges)

        var textData = 'Hello World!';
        console.info('f_test47: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test47: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test47: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test47: systemPasteboard.setPasteData promise');

          console.info('f_test47: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test47: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test47: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test47: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test47: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_4700 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_4800
      * @tc.name      关闭内容变化通知功能向剪贴板数据增加删除等html数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test48', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_4800 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test48: systemPasteboard.clear promise');

        console.info('f_test48: Close the infor for pasteboard content changes')
        systemPasteboard.off('update', contentChanges)

        var htmlText = '<html><head></head><body>Hello World!</body></html>'
        console.info('f_test48: createHtmlData htmlText = ' + htmlText);
        var pasteData = pasteboard.createHtmlData(htmlText);
        console.info('f_test48: createHtmlData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test48: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test48: systemPasteboard.setPasteData promise');

          console.info('f_test48: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test48: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test48: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test48: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test48: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_4800 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_4900
      * @tc.name      关闭内容变化通知功能向剪贴板数据增加删除等uri数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test49', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_4900 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test49: systemPasteboard.clear promise');

        console.info('f_test49: Close the infor for pasteboard content changes')
        systemPasteboard.off('update', contentChanges)

        var uriText = 'https://www.baidu.com/'
        console.info('f_test49: createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test49: createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test49: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test49: systemPasteboard.setPasteData promise');

          console.info('f_test49: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test49: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test49: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test49: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test49: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_4900 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5000
      * @tc.name      关闭内容变化通知功能向剪贴板数据增加删除等want数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test50', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5000 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test50: systemPasteboard.clear promise');

        console.info('f_test50: Open the infor for pasteboard content changes')
        systemPasteboard.off('update', contentChanges)

        var want = {
          bundleName: "com.example.myapplication45",
          abilityName: "com.example.myapplication45.MainAbility"
        }
        console.info('f_test50: createWantData = ' + want)
        var pasteData = pasteboard.createWantData(want);
        console.info('f_test50: createWantData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test50: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test50: systemPasteboard.setPasteData promise');

          console.info('f_test50: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test50: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test50: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test50: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test50: Removes the Record')
              expect(pasteData1.removeRecordAt(0) === true || pasteData1.removeRecordAt(0) === false).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_5000 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5100
      * @tc.name      关闭内容变化通知功能清除剪切板内容
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test51', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5100 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test51: systemPasteboard.clear promise');

        console.info('f_test51: Close the infor for pasteboard content changes')
        systemPasteboard.off('update', contentChanges)

        var textData = 'Hello World!';
        console.info('f_test51: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test51: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test51: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test51: systemPasteboard.setPasteData promise');

          console.info('f_test51: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test51: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test51: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test51: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test51: Clears the pasteBoard')
              systemPasteboard.clear()

              console.info('SUB_pasteBoard_function_JS_API_5100 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5200
      * @tc.name      清除剪切板内的文本数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test52', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5200 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test52: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test52: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test52: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test52: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test52: systemPasteboard.setPasteData promise');

          console.info('f_test52: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test52: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test52: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test52: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test52: Clears the pasteBoard')
              systemPasteboard.clear()

              console.info('f_test52: Checks the number of records');
              systemPasteboard.getPasteData().then((data) => {
                console.info('f_test52: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                var pasteData2 = data;
                var recordCount = pasteData2.getRecordCount();
                console.info('f_test52 recordCount = ' + recordCount);
              })

              console.info('SUB_pasteBoard_function_JS_API_5200 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5300
      * @tc.name      清除剪切板内的uri数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test53', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5300 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test53: systemPasteboard.clear promise');

        var uriText = 'https://www.baidu.com/'
        console.info('f_test53: createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test53: createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test53: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test53: systemPasteboard.setPasteData promise');

          console.info('f_test53: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test53: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test53: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test53: Clears the pasteBoard')
              systemPasteboard.clear()

              console.info('f_test53: Checks the number of records');
              systemPasteboard.getPasteData().then((data) => {
                console.info('f_test53: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                var pasteData2 = data;
                var recordCount = pasteData2.getRecordCount();
                console.info('f_test38 recordCount = ' + recordCount);
              })

              console.info('SUB_pasteBoard_function_JS_API_5300 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5400
      * @tc.name      清除剪切板内的html数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test54', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5400 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test54: systemPasteboard.clear promise');

        var htmlText = '<html><head></head><body>Hello World!</body></html>'
        console.info('f_test54: createHtmlData htmlText = ' + htmlText);
        var pasteData = pasteboard.createHtmlData(htmlText);
        console.info('f_test54: createHtmlData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test54: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test54: systemPasteboard.setPasteData promise');

          console.info('f_test54: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test54: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test54: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test54: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test54: Clears the pasteBoard')
              systemPasteboard.clear()

              console.info('f_test54: Checks the number of records');
              systemPasteboard.getPasteData().then((data) => {
                console.info('f_test54: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                var pasteData2 = data;
                var recordCount = pasteData2.getRecordCount();
                console.info('f_test38 recordCount = ' + recordCount);
              })

              console.info('SUB_pasteBoard_function_JS_API_5400 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5500
      * @tc.name      清除剪切板内的want数据项
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test55', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5500 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test55: systemPasteboard.clear promise');

        var myWant = {
          bundleName: "com.example.myapplication55",
          abilityName: "com.example.myapplication55.MainAbility"
        }
        console.info('f_test01: createWantData want = ' + myWant);
        var pasteData = pasteboard.createWantData(myWant);
        console.info('f_test01: createWantData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test55: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test55: systemPasteboard.setPasteData promise');

          console.info('f_test55: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test55: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test55: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test55: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test55: Clears the pasteBoard')
              systemPasteboard.clear()

              console.info('f_test55: Checks the number of records');
              systemPasteboard.getPasteData().then((data) => {
                console.info('f_test55: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                var pasteData2 = data;
                var recordCount = pasteData2.getRecordCount();
                console.info('f_test38 recordCount = ' + recordCount);
              })

              console.info('SUB_pasteBoard_function_JS_API_5500 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5600
      * @tc.name      向剪切板内增加30条数据项然后清除
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test56', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5600 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test56: systemPasteboard.clear promise');

        var textData0 = 'Hello World!';
        console.info('f_test56: createPlainTextData textData = ' + textData0);
        var pasteData = pasteboard.createPlainTextData(textData0);
        console.info('f_test56: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        var textData = ''
        for (var i = 1; i < 30; i++) {
          textData = 'Hello World'
          textData = textData + i
          console.info('f_test56: addTextRecord = ' + textData)
          pasteData.addTextRecord(textData)
        }

        console.info('f_test56: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test56: systemPasteboard.setPasteData promise');

          console.info('f_test56: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test56: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test56: Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test56: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 30).assertTrue();

              console.info('f_test56: Clears the pasteBoard')
              systemPasteboard.clear()

              console.info('f_test56: Checks the number of records');
              systemPasteboard.getPasteData().then((data) => {
                console.info('f_test56: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                var pasteData2 = data;
                var recordCount = pasteData2.getRecordCount();
                console.info('f_test38 recordCount = ' + recordCount);
              })

              console.info('SUB_pasteBoard_function_JS_API_5600 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5700
      * @tc.name      向剪贴板数据各增加5条文本urihtml数据然后清除
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test57', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5700 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {

        var textData0 = 'Hello World0'
        console.info('f_test57: createPlainTextData = ' + textData0)
        var pasteData = pasteboard.createPlainTextData(textData0)

        var textData = ''
        for (var i = 1; i < 5; i++) {
          textData = 'Hello World'
          textData = textData + i
          pasteData.addTextRecord(textData)
        }

        var htmlText = ''
        for (var i = 0; i < 5; i++) {
          htmlText = '<html><head></head><body>Hello World!</body></html>'
          htmlText = htmlText + i
          pasteData.addHtmlRecord(htmlText)
        }

        var uriText = ''
        for (var i = 0; i < 5; i++) {
          uriText = 'https://www.baidu.com/'
          uriText = uriText + i
          pasteData.addUriRecord(uriText)
        }

        systemPasteboard.setPasteData(pasteData).then(() => {
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test57: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test57: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 15).assertTrue();
              systemPasteboard.clear()
              systemPasteboard.getPasteData().then((data) => {
                console.info('f_test57: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
                var pasteData2 = data;
                var recordCount = pasteData2.getRecordCount();
                console.info('f_test38 recordCount = ' + recordCount);
              })

              console.info('SUB_pasteBoard_function_JS_API_5700 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5800
      * @tc.name      向剪贴板数据增加文本数据项查询剪贴板存在剪贴板数据
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test58', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5800 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test58: systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test58: createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test58: createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test58: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test58: systemPasteboard.setPasteData promise');

          console.info('f_test58: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test58: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('SUB_pasteBoard_function_JS_API_5800 end')
            done();
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_5900
      * @tc.name      向剪贴板数据增加uri数据项查询剪贴板存在剪贴板数据
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test59', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_5900 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('systemPasteboard.clear promise');

        var uriText = 'https://www.baidu.com/'
        console.info('f_test59: createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test59: createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test59: Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test59: systemPasteboard.setPasteData promise');

          console.info('f_test59: Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test59: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('SUB_pasteBoard_function_JS_API_5900 end')
            done();
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_6000
      * @tc.name      向剪贴板数据增加html数据项查询剪贴板存在剪贴板数据
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test60', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6000 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test60 systemPasteboard.clear promise');

        var htmlText = '<html><head></head><body>Hello World!</body></html>'
        console.info('f_test60createHtmlData htmlText = ' + htmlText);
        var pasteData = pasteboard.createHtmlData(htmlText);
        console.info('f_test60createHtmlData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test60Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test60systemPasteboard.setPasteData promise');

          console.info('f_test60Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test60systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('SUB_pasteBoard_function_JS_API_6000 end')
            done();
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_6100
      * @tc.name      向剪贴板数据增加want数据项查询剪贴板存在剪贴板数据
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test61', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6100 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test61 systemPasteboard.clear promise');

        var myWant = {
          bundleName: "com.example.myapplication8",
          abilityName: "com.example.myapplication8.MainAbility"
        }
        console.info('f_test01: createWantData want = ' + myWant);
        var pasteData = pasteboard.createWantData(myWant);
        console.info('f_test01: createWantData pasteData = ' + JSON.stringify(pasteData));

        console.info('Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('systemPasteboard.setPasteData promise');

          console.info('Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('SUB_pasteBoard_function_JS_API_6100 end')
            done();
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_6200
      * @tc.name      向剪贴板数据各增加5条文本urihtml查询剪贴板存在剪贴板数据
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test62', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6200 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test62 systemPasteboard.clear promise');

        var textData0 = 'Hello World0'
        console.info('f_test62 createPlainTextData = ' + textData0)
        var pasteData = pasteboard.createPlainTextData(textData0)

        var textData = ''
        for (var i = 1; i < 5; i++) {
          textData = 'Hello World'
          textData = textData + i
          console.info('f_test62 addTextRecord = ' + textData)
          pasteData.addTextRecord(textData)
        }

        var htmlText = ''
        for (var i = 0; i < 5; i++) {
          htmlText = '<html><head></head><body>Hello World!</body></html>'
          htmlText = htmlText + i
          console.info('f_test62 addHtmlRecord = ' + htmlText)
          pasteData.addHtmlRecord(htmlText)
        }

        var uriText = ''
        for (var i = 0; i < 5; i++) {
          uriText = 'https://www.baidu.com/'
          uriText = uriText + i
          console.info('f_test62 addUriRecord = ' + uriText)
          pasteData.addUriRecord(uriText)
        }

        console.info('f_test62 Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test62 systemPasteboard.setPasteData promise');

          console.info('f_test62 Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test62 systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('SUB_pasteBoard_function_JS_API_6200 end')
            done();
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_6300
      * @tc.name      更新剪贴板数据查询剪贴板存在剪贴板数据
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test63', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6300 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test63 systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test63 createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test63 createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test63 systemPasteboard.setPasteData promise');

          console.info('f_test63 Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test63 systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test63 Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test63 systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              var textData1 = 'Hello World1'
              console.info('f_test63 Replaces the Record = ' + textData1)
              var pasteDataRecord = pasteboard.createPlainTextRecord(textData1)
              pasteData1.replaceRecordAt(0, pasteDataRecord)

              console.info('f_test63 Checks there is content in the pasteboard')
              systemPasteboard.hasPasteData().then((data) => {
                console.info('f_test63 systemPasteboard.hasPasteData promise data = ' + data);
                expect(data === true || data === false).assertTrue();
              })

              console.info('SUB_pasteBoard_function_JS_API_6300 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_6400
      * @tc.name      删除所有的剪贴板数据查询剪贴板不存在剪贴板数据
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test64', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6400 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test64 systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test64 createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test64 createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test64 Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test64 systemPasteboard.setPasteData promise');

          console.info('f_test64 Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test64 systemPasteboard.hasPasteData promise data = ' + data);
L
liangzhenyu123 已提交
3395
            expect(data).assertTrue();
3396 3397 3398 3399 3400 3401 3402

            console.info('f_test64 Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test64 systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              var recordCount = pasteData1.getRecordCount();
              console.info('f_test64 recordCount = ' + recordCount);
L
liangzhenyu123 已提交
3403
              expect(recordCount).assertEqual(1)
3404 3405 3406 3407 3408 3409

              console.info('f_test64 Removes the Record')
              pasteData1.removeRecordAt(0)

              console.info('f_test64 Checks the number of records');
              var recordCount1 = pasteData1.getRecordCount();
L
liangzhenyu123 已提交
3410
              expect(recordCount1).assertEqual(0);
3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466
              console.info('f_test64 recordCount = ' + recordCount1);

              console.info('SUB_pasteBoard_function_JS_API_6400 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_6500
      * @tc.name      清除剪贴板数据查询剪贴板不存在剪贴板数据
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test65', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6500 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test65 systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test65 createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test65 createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test65 Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test65 systemPasteboard.setPasteData promise');

          console.info('f_test65 Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test65 systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test65 Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test65 systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test65 Clears the pasteBoard')
              systemPasteboard.clear()

              console.info('f_test65 Writes PasteData to the pasteboard');
              systemPasteboard.setPasteData(pasteData1).then(() => {
                console.info('f_test65 systemPasteboard.setPasteData promise');

                console.info('f_test65 Checks there is no content in the pasteboard')
                systemPasteboard.hasPasteData().then((data) => {
                  console.info('f_test65 systemPasteboard.hasPasteData promise data = ' + data);

L
liangzhenyu123 已提交
3467
                  console.info('SUB_pasteBoard_function_JS_API_6500 end');
3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732
                  done();
                });
              });
            });
          });
        });
      });
    })

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_6600
    * @tc.name      将文本数据强制转换为文本
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test66', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6600 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test66 systemPasteboard.clear promise');

        var textData = 'Hello World!';
        console.info('f_test66 createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test66 createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test66 Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test66 systemPasteboard.setPasteData promise');

          console.info('f_test66 Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test66 systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test66 Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test66 systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test66 Converts the PlainTextData to text')
              var pasteDataRecord = pasteData1.getRecordAt(0)
              console.info('checks pasteDataRecord.mimeType = ' + pasteDataRecord.mimeType)

              console.info('f_test66 pasteDataRecord.convertToText = ' + pasteDataRecord.convertToText);

              console.info('f_test66 SUB_pasteBoard_function_JS_API_6600 end');
              done();
            })
          });
        });
      });
    })

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_6700
    * @tc.name      将一条含有特殊字符中英混杂的文本数据强制转换为文本
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test67', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6700 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test67 systemPasteboard.clear promise');

        var textData = 'Hello 中国!@#$%^&*()_+{}\?.';
        console.info('f_test67 createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test67 createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test67 Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test67 systemPasteboard.setPasteData promise');

          console.info('f_test67 Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test67 systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test67 Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test67 systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test67 Converts the PlainTextData to text')
              var pasteDataRecord = pasteData1.getRecordAt(0)
              console.info('f_test67 pasteDataRecord.convertToText = ' + pasteDataRecord.convertToText);

              console.info('SUB_pasteBoard_function_JS_API_6700 end');
              done();
            })
          });
        });
      });
    })

    /**
      * @tc.number    SUB_pasteBoard_function_JS_API_6800
      * @tc.name      将一条超长文本数据 (大小为301K)强制转换为文本
      * @tc.desc      Test pasteBoard API functionality.
      * @tc.size      : MEDIUM
      * @tc.type      : Function
      * @tc.level     : Level 0
      */
    it('pasteboard_function_test68', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6800 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test68 systemPasteboard.clear promise');

        var textData = ''
        for (var i = 0; i < 301; i++) {
          textData = textData + "A";
        }
        console.info('f_test68 createPlainTextData textData = ' + textData);
        var pasteData = pasteboard.createPlainTextData(textData);
        console.info('f_test68 createPlainTextData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test68 Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test68 systemPasteboard.setPasteData promise');

          console.info('f_test68 Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test68 systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test68 Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test68 systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test68 Converts the PlainTextData to text')
              var pasteDataRecord = pasteData1.getRecordAt(0)
              console.info('f_test68 pasteDataRecord.convertToText = ' + pasteDataRecord.convertToText);

              console.info('SUB_pasteBoard_function_JS_API_6800 end');
              done();
            })
          });
        });
      });
    })

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_6900
    * @tc.name      将uri数据强制转换为文本
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test69', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_6900 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {
        console.info('f_test69 systemPasteboard.clear promise');

        var uriText = 'https://www.baidu.com/'
        console.info('f_test69 createUriData uriText = ' + uriText);
        var pasteData = pasteboard.createUriData(uriText);
        console.info('f_test69 createUriData pasteData = ' + JSON.stringify(pasteData));

        console.info('f_test69 Writes PasteData to the pasteboard');
        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('f_test69 systemPasteboard.setPasteData promise');

          console.info('f_test69 Checks there is content in the pasteboard')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test69 systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            console.info('f_test69 Checks the number of records');
            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test69 systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              expect(pasteData1.getRecordCount() == 1).assertTrue();

              console.info('f_test69 Converts the PlainTextData to text')
              var pasteDataRecord = pasteData1.getRecordAt(0)

              pasteDataRecord.convertToText().then((data) => {
                console.info('convertToText success data : ' + JSON.stringify(data));
              }).catch((error) => {
                console.error('convertToText failed because ' + JSON.stringify(error));
              });
              ;

              console.info('SUB_pasteBoard_function_JS_API_6900 end');
              done();
            })
          });
        });
      });
    })

    /**
    * @tc.number    SUB_pasteBoard_function_JS_API_7000
    * @tc.name      复制文本uri格式
    * @tc.desc      Test pasteBoard API functionality.
    * @tc.size      : MEDIUM
    * @tc.type      : Function
    * @tc.level     : Level 0
    */
    it('pasteboard_function_test70', 0, async function (done) {
      console.info('SUB_pasteBoard_function_JS_API_7000 start')

      var systemPasteboard = pasteboard.getSystemPasteboard();
      systemPasteboard.clear().then(() => {

        var textData0 = 'Hello World0'
        console.info('f_test70: createPlainTextData = ' + textData0)

        var pasteData = pasteboard.createPlainTextData(textData0)
        console.info('f_test70: createPlainTextData = ' + JSON.stringify(pasteData))

        var uriText = pasteboard.createUriRecord("https://www.baidu.com/");
        pasteData.addRecord(uriText);
        console.info('f_test70: addRecord(uriText) = ' + pasteData)
        console.info('f_test70: addRecord(uriText) = ' + JSON.stringify(pasteData))


        systemPasteboard.setPasteData(pasteData).then(() => {
          console.info('---------------------------->1')
          systemPasteboard.hasPasteData().then((data) => {
            console.info('f_test70: systemPasteboard.hasPasteData promise data = ' + data);
            expect(data === true || data === false).assertTrue();

            systemPasteboard.getPasteData().then((data) => {
              console.info('f_test70: systemPasteboard.getPasteData data = ' + JSON.stringify(data));
              var pasteData1 = data;
              var recordCount = pasteData1.getRecordCount();
              console.info('f_test70: recordCount=' + recordCount);
              expect(pasteData1.getRecordCount() == 2).assertTrue();

              console.info('SUB_pasteBoard_function_JS_API_7000 end');
              done();
            })
          });
        });
      });
    })


    /**
    *  The callback function is used for pasteboard content changes
    */
    function contentChanges() {
      console.info('#EVENT: The content is changed in the pasteboard')
    }
  });
}