mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 14:11:50 +03:00
feat(electron): add a test for clipboard access (#2606)
This commit is contained in:
parent
4834e5653d
commit
cc84506cbb
@ -108,6 +108,12 @@ describe('Electron', function() {
|
||||
const window = await application.firstWindow();
|
||||
expect(await window.title()).toBe('Hello World!');
|
||||
});
|
||||
it('should have a clipboard instance', async ({ application }) => {
|
||||
const clipboardContentToWrite = 'Hello from Playwright';
|
||||
await application.evaluate(async ({clipboard}, text) => clipboard.writeText(text), clipboardContentToWrite);
|
||||
const clipboardContentRead = await application.evaluate(async ({clipboard}) => clipboard.readText());
|
||||
await expect(clipboardContentRead).toEqual(clipboardContentToWrite);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Electron per window', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user