diff --git a/test/evaluation.spec.js b/test/evaluation.spec.js index ee3988dcc0b2d..896745ce7b3cd 100644 --- a/test/evaluation.spec.js +++ b/test/evaluation.spec.js @@ -226,7 +226,11 @@ module.exports.addTests = function({testRunner, expect}) { expect(error.message).toContain('JSHandles can be evaluated only in the context they were created'); }); it('should simulate a user gesture', async({page, server}) => { - const result = await page.evaluate(() => document.execCommand('copy')); + const result = await page.evaluate(() => { + document.body.appendChild(document.createTextNode('test')); + document.execCommand('selectAll'); + return document.execCommand('copy'); + }); expect(result).toBe(true); }); it('should throw a nice error after a navigation', async({page, server}) => {