cy.fixture('invitati100.xls').as('logo')
cy.get('[name="fileLista"]').then(function($input) {
// convert the logo base64 string to a blob
return Cypress.Blob.base64StringToBlob(this.logo, 'application/vnd.ms-excel')
.then((blob) => {
// pass the blob to the fileupload jQuery plugin
// used in your application's code
// which initiates a programmatic upload
$input.fileupload('add', { files: blob })
})
})
给出错误:
cypress_runner. : 159529 InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded contains characters outside of the Latin1 range.
at http://platform/__cypress/runner/cypress_runner.js:1531:44
From previous event:
at Context.thenFn (http://platform/__cypress/runner/cypress_runner.js:69293:23)
我们正在使用dojo作为框架。 为什么会出现此错误?
谢谢!