I am trying to upload a xlsx file using fixture
and what I want is to automate the process of finding file, select the file from file management (finder) without prompting the finder and manually choose the file.
Is there anyway to make cypress to do all steps by its own?
here is my code:
cy.fixture('fileName', 'binary').then((fileContent) => {
cy.get('input[type=file]')
.upload(
{
fileContent,
fileName: 'fileName',
mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
encoding: 'utf-8',
},
{ subjectType: 'input' }
)