diff --git a/test/e2e/tests/console/console-output.test.ts b/test/e2e/tests/console/console-output.test.ts index 9a0820fe170..f24b246be40 100644 --- a/test/e2e/tests/console/console-output.test.ts +++ b/test/e2e/tests/console/console-output.test.ts @@ -23,8 +23,8 @@ test.describe('Console Output', { tag: [tags.WIN, tags.CONSOLE, tags.WEB] }, () await app.workbench.console.sendEnterKey(); await app.workbench.console.waitForReady('>>>'); - const el = page.locator('.console-instance'); - await expect(await el.evaluate((el) => el.scrollWidth)).toBeLessThanOrEqual(await el.evaluate((el) => el.clientWidth)); + const el = app.workbench.console.activeConsole; + expect(await el.evaluate((el) => el.scrollWidth)).toBeLessThanOrEqual(await el.evaluate((el) => el.clientWidth)); }); });