Uploading a file in Cypress in Salesforce and there is no type = file

I’m trying to attach a .csv file in Salesforce application and there is no type = file. How can we attach file? None of the solutions worked for me. Any help.

Tried:

const filePath = 'shelf_upload_template.csv';
cy.xpath("//span[text()='Upload Files']").eq(1).invoke('show').attachFile(filePath)
cy.wait(5000);
cy.xpath("//span[text()='Add']").click()
AND
cy.xpath("//a[@data-label='Attachments']").click({force:true})

Here is the Console:

<lightning-icon icon-name="utility:upload" class="slds-icon-utility-upload slds-button__icon slds-button__icon--left slds-icon_container forceIcon" data-data-rendering-service-uid="1157" data-aura-rendered-by="5616:0" lwc-4897l11qtae-host="" data-aura-class="forceIcon"><span lwc-4897l11qtae="" style="--sds-c-icon-color-background: var(--slds-c-icon-color-background, transparent)" part="boundary"><lightning-primitive-icon lwc-4897l11qtae="" exportparts="icon" size="xx-small" variant="inverse" lwc-55d10h1nfm1-host=""><svg focusable="false" aria-hidden="true" viewBox="0 0 520 520" part="icon" lwc-55d10h1nfm1="" data-key="upload" class="slds-icon slds-icon_xx-small"><g lwc-55d10h1nfm1=""><path d="M485 310h-30c-8 0-15 8-15 15v100c0 8-7 15-15 15H95c-8 0-15-7-15-15V325c0-7-7-15-15-15H35c-8 0-15 8-15 15v135a40 40 0 0040 40h400a40 40 0 0040-40V325c0-7-7-15-15-15zM270 24c-6-6-15-6-21 0L114 159c-6 6-6 15 0 21l21 21c6 6 15 6 21 0l56-56c6-6 18-2 18 7v212c0 8 6 15 14 15h30c8 0 16-8 16-15V153c0-9 10-13 17-7l56 56c6 6 15 6 21 0l21-21c6-6 6-15 0-21z" lwc-55d10h1nfm1=""></path></g></svg></lightning-primitive-icon></span></lightning-icon>