Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kkdv opened this issue Dec 26, 2021 · 2 comments

Comments

@kkdv
Copy link

kkdv commented Dec 26, 2021

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>
@kkdv
Copy link
Author

kkdv commented Feb 23, 2022

Any update on this?

@andisan86
Copy link

andisan86 commented Apr 1, 2024

Able to reproduce this issue in Cypress 11.2.0m Chrome v123.

Workaround: use Cypress' selectFile API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants