From 42be7ce5026340b932736e84388c76ae4edb6fb3 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Thu, 14 Mar 2024 20:14:22 +0100 Subject: [PATCH] nit --- tests/page/page-set-input-files.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/page/page-set-input-files.spec.ts b/tests/page/page-set-input-files.spec.ts index 1893615f52..3ed4068f8e 100644 --- a/tests/page/page-set-input-files.spec.ts +++ b/tests/page/page-set-input-files.spec.ts @@ -90,7 +90,8 @@ it('should upload large file', async ({ page, server, browserName, isMac, isAndr it('should throw an error if the file does not exist', async ({ page, server, asset }) => { await page.goto(server.PREFIX + '/input/fileupload.html'); - const error = await page.locator('input').first().setInputFiles('i actually do not exist.txt').catch(e => e); + const input = await page.$('input'); + const error = await input.setInputFiles('i actually do not exist.txt').catch(e => e); expect(error.message).toContain('ENOENT: no such file or directory'); expect(error.message).toContain('i actually do not exist.txt'); });