diff --git a/e2e/components/Tearsheet/TearsheetNarrow-test.avt.e2e.js b/e2e/components/Tearsheet/TearsheetNarrow-test.avt.e2e.js index 8bc1bc9dc3..7fce159719 100644 --- a/e2e/components/Tearsheet/TearsheetNarrow-test.avt.e2e.js +++ b/e2e/components/Tearsheet/TearsheetNarrow-test.avt.e2e.js @@ -128,9 +128,7 @@ test.describe('TearsheetNarrow @avt', () => { await expect(page.locator('.decorator-container')).toBeInViewport(); // Selecting the first slug button - const slugButton1 = page - .locator('*[aria-label="AI - Show information"]') - .first(); + const slugButton1 = page.getByLabel('AI - Show information'); const closeButton = page.getByLabel('Close the tearsheet'); const inputField = page.locator('#tss-ft1');