Skip to content

Commit c11381f

Browse files
committed
Goto and getByText
1 parent 62354ed commit c11381f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

playwright/click.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ const context = await browser.newContext({
4141
});
4242

4343
const page = await context.newPage();
44+
await page.goto("/");
4445

45-
await page.locator("a[href='campfire-commerce/']").click();
46+
await page.getByText('Campfire Commerce').click();
4647

4748
if (page.url() !== 'http://127.0.0.1:1234/campfire-commerce/') {
4849
throw new Error('The new page URL is not as expected.');

0 commit comments

Comments
 (0)