Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Cypress上载excel文件_Excel_File Upload_Encoding_Xlsx_Cypress - Fatal编程技术网

使用Cypress上载excel文件

使用Cypress上载excel文件,excel,file-upload,encoding,xlsx,cypress,Excel,File Upload,Encoding,Xlsx,Cypress,我正在使用此软件包进行文件上载。 当我试图上传excel(xlsx,xls)时,我得到了一个关于编码的错误 [cypress文件上载错误]:“编码”无效。 请查看文档以查找支持的“编码”值 我有以下代码: const fileName = 'file_example_XLSX_1000.xlsx' cy.fixture('files used for testing/file_example_XLSX_1000.xlsx').then(fileContent => { cy.get('#f

我正在使用此软件包进行文件上载。 当我试图上传excel(xlsx,xls)时,我得到了一个关于编码的错误

[cypress文件上载错误]:“编码”无效。 请查看文档以查找支持的“编码”值

我有以下代码:

const fileName = 'file_example_XLSX_1000.xlsx'
cy.fixture('files used for testing/file_example_XLSX_1000.xlsx').then(fileContent => {
cy.get('#file').upload({ fileContent, fileName, mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', encoding: 'UTF - 8', }){ subjectType: 'input' }})

编码应该是
UTF-8
not
UTF-8
编码应该是
UTF-8
not
UTF-8

大小写和空格

考虑一下
utf8
utf-8
——这两个是不同的


大小写和空格很重要

考虑一下
utf8
utf-8
——这两个是不同的