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

Fix for clipboard recipe #898

Open
Amy-B-Tradition opened this issue Sep 6, 2024 · 0 comments
Open

Fix for clipboard recipe #898

Amy-B-Tradition opened this issue Sep 6, 2024 · 0 comments

Comments

@Amy-B-Tradition
Copy link

In the permissions spec for the clipboard, I saw a comment "how can we paste in chrome".

This seems to work for me

cy.fixture(csvPath).then(async (textToPaste) => {
      cy.window().its('navigator.clipboard')
        .then(clip => clip.writeText(textToPaste))
      cy.get('[data-testid="my-ag-grid"]')
        .find('.ag-cell.ag-column-first')
        .first()
        .as('firstCell')
        .click()
      cy.get('@firstCell').type('{ctrl}v')
      cy.get('@firstCell').contains('myText')
    })
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

1 participant