Skip to content

Commit 7c19fc6

Browse files
committed
Remove confusing lines in example
1 parent 30bade7 commit 7c19fc6

File tree

1 file changed

+1
-3
lines changed
  • docs/sources/k6/next/javascript-api/k6-browser/locator

1 file changed

+1
-3
lines changed

docs/sources/k6/next/javascript-api/k6-browser/locator/locator.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ export default async function () {
6565
`);
6666

6767
// Use locator.locator to find specific products within the list
68-
const productList = page.locator('div[data-testid="products"]');
69-
const fruitProducts = productList.locator('div[data-category="fruits"]');
70-
const appleProduct = fruitProducts.locator('div[data-product="apple"]');
68+
const appleProduct = page.locator('div[data-product="apple"]');
7169
const addToCartButton = appleProduct.locator('//button[text()="Add to Cart"]');
7270

7371
// Interact with the nested locators

0 commit comments

Comments
 (0)