We are trying to copy and paste some text for some of our functionality and there is Chrome popup that keeps coming up and preventing further action. It’s the allow shared clipboard popup. Is there a way to handle this programmatically or via some Chrome flag?
import { Selector } from 'testcafe';
const editor = Selector('div[class="full-bleed-uic-editor editor editable"]');
fixture`copy and paste`
.meta({
fixtureID: 'f-0001',
author: '',
app: '',
})
.beforeEach(async (t) => {
console.log('Copy and paste');
});
test.meta({
priority: 'p1',
testID: 't-0001',
testType: 'Smoke',
testRailCaseId: '',
})('Copy and paste', async (t) => {
await t.navigateTo('https://www.chegg.com');
await t.click(editor);
await t.typeText(editor, 'Python is very easy programming language');
await t.pressKey('ctrl+a ctrl+c ctrl+v ctrl+v');
});
This is the popup that’s stopping the copy and paste action.
If we manually accept it and then rerun the test in the same window, everything works as expected.
Any help would be appreciated, thanks!