Skip to content

Commit 0e393d8

Browse files
AgnesTouletankur22
andauthored
update strict explanation
Co-authored-by: Ankur <[email protected]>
1 parent 17f5f8d commit 0e393d8

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The Locator API makes it easier to work with dynamically changing elements. Some
1212
- Helps with writing robust tests by finding an element even if the underlying frame navigates.
1313
- Makes it easier to work with dynamic web pages and SPAs built with Svelte, React, Vue, etc.
1414
- Enables the use of test abstractions like the Page Object Model (POM) pattern to simplify and organize tests.
15-
- `strict` mode is enabled for some `locator` methods, which means that if more than one element matches the given selector it will throw an error.
15+
- `strict` mode is enabled for all `locator` methods that are expected to target a single DOM element, meaning that if more than one element matches the given selector, an error will be thrown.
1616

1717
Locator can be created with the [page.locator(selector[, options])](https://grafana.com/docs/k6/<K6_VERSION>/javascript-api/k6-browser/page/locator) method.
1818

0 commit comments

Comments
 (0)