mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00: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();
|
const window = await application.firstWindow();
|
||||||
expect(await window.title()).toBe('Hello World!');
|
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() {
|
describe('Electron per window', function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user