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

Chaining .selectFile from document throws an error #29593

Open
georgekaran opened this issue May 29, 2024 · 2 comments
Open

Chaining .selectFile from document throws an error #29593

georgekaran opened this issue May 29, 2024 · 2 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this stale no activity on this issue for a long period type: unexpected behavior User expected result, but got another

Comments

@georgekaran
Copy link

Current behavior

When attempting to use the following commad:

cy.document().selectFile('example.json', {action: 'drag-drop'});

I get the following error:

CypressError: `cy.selectFile()` failed because it requires a DOM element.

The subject received was:

  > `<document>`

The previous command that ran was:

  > `cy.document()`

Desired behavior

It should allow drop files in the document as described in the docs

Test code to reproduce

I made a repo with the issue: https://github.com/georgekaran/cypress-test-tiny/tree/document-select-file

Cypress Version

v12.17.4

Node version

v20.10.0

Operating System

macOS 14.5

Debug Logs

No response

Other

No response

@cacieprins cacieprins added the stage: needs investigating Someone from Cypress needs to look at this label May 29, 2024
@jennifer-shehane jennifer-shehane added the type: unexpected behavior User expected result, but got another label Jun 3, 2024
@jennifer-shehane
Copy link
Member

Yah I'm unsure if the documentation is incorrect or if we changed the behavior unintenionally somewhere to make this fail. It makes sense to me that you'd target a document to drag and drop though.

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this stale no activity on this issue for a long period type: unexpected behavior User expected result, but got another
Projects
None yet
Development

No branches or pull requests

4 participants