BrauzerLab
← Back to missions 6 / 50

Find the Sale Card

Medium ~150 sec

The product list has three cards. Only one is on sale — it carries a SALE badge. Your job is to find that card and click it.

Playwright’s filter() method lets you narrow a locator result by text. You can select all cards and then filter to the one that contains the SALE text.

page is already available.

Targeting one element among many that share the same class is the most common use of .filter().

TASK

Click the card with the SALE badge.

Provided for you
import { test, expect } from '@playwright/test';

test('Find the Sale Card', async ({ page }) => {
  await page.goto('https://lab.local/mission/filter-sale-card');
  // ↓ Your code goes below ↓
});
Editor
https://lab.local/mission/filter-sale-card
Loading...
Results will appear here — press Run or Check.