Skip to content

cypress-file-upload with subjectType: "drag-n-drop" does not work on Chrome & Electron but works fine with Firefox #352

@kkdv

Description

@kkdv

Cypress interactive test using cypress-file-upload (v 5.0.8) with subjectType: "drag-n-drop" does not work in Chrome & Electron but works flawlessly in Firefox.

In Chrome and Electron, the command attachFile passes successfully with no error messages produced. Are there any config settings in Chrome to make this work?

image

Environment
MacOS 11.6.1 BigSur
Cypress 9.0
Browser versions: Chrome 96 ; Firefox 95 ; Electron 94

Cypress Spec file

filepath = "/tmp/index.html"
cy.get('.files-row').attachFile( filepath, {
            subjectType: 'drag-n-drop',
            force: true
 })

filepath = "/tmp/index2.html"
cy.get('.files-row').attachFile( filepath, {
            subjectType: 'drag-n-drop',
            force: true
 })

DOM. (rendered with Ember.js)

<div class="file">
   <div class="files-row">
            <span> Drag file here </span>
     </div>
 </div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions