Total Laravel Dusk noob here (started using it today). I wanted to test a "copy link" on the Web app I'm working on and I ran into browser permissions issues when trying to access the clipboard content while testing. Of course, that default behavior makes sense, because Google Chrome prompts the user and ask for permission to access the clipboard. However, I haven't found a way to tell Dusk to enable specific permissions. I found the following Cypress example that is probably the appropriate way of doing it, but I don't know if there's a Dusk equivalent.
cy.wrap(Cypress.automation('remote:debugger:protocol', {
command: 'Browser.grantPermissions',
params: {
permissions: ['clipboardReadWrite', 'clipboardSanitizedWrite'],
origin: window.location.origin,
},
}))
Thanks in advance!