2022-02-24 15:47:06 +00:00
|
|
|
export default function grantClipboardAccess() {
|
|
|
|
// Use the Chrome debugger protocol to grant access to the clipboard.
|
|
|
|
// https://chromedevtools.github.io/devtools-protocol/tot/Browser/#method-grantPermissions
|
|
|
|
cy.wrap(
|
|
|
|
Cypress.automation("remote:debugger:protocol", {
|
|
|
|
command: "Browser.grantPermissions",
|
|
|
|
params: {
|
|
|
|
permissions: ["clipboardReadWrite", "clipboardSanitizedWrite"],
|
|
|
|
origin: window.location.origin,
|
|
|
|
},
|
2023-07-11 14:03:21 +00:00
|
|
|
}),
|
2022-02-24 15:47:06 +00:00
|
|
|
);
|
|
|
|
}
|