@@ -92,7 +92,7 @@ Providing roles via `role` or `aria-*` attributes to built-in elements that alre
9292
9393- ` exact: boolean `
9494
95- Whether the ` name ` is matched exactly : case - sensitive and whole - string . Disabled by default . This option is ignored if ` name ` is a regular expression . Note that exact match still trims whitespace .
95+ Whether the ` name ` is matched exactly : case - sensitive and whole - string . Defaults to [ ` browser.locators.exact ` ]( / config / browser / locators # browser - locators - exact ), which is ` true ` by default . This option is ignored if ` name ` is a regular expression . Note that exact match still trims whitespace .
9696
9797 ` ` ` tsx
9898 <button>Hello World</button>
@@ -240,7 +240,7 @@ page.getByAltText('non existing alt text') // ❌
240240
241241- ` exact: boolean `
242242
243- Whether the ` text ` is matched exactly : case - sensitive and whole - string . Disabled by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
243+ Whether the ` text ` is matched exactly : case - sensitive and whole - string . Defaults to [ ` browser.locators.exact ` ]( / config / browser / locators # browser - locators - exact ), which is ` true ` by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
244244
245245** See also **
246246
@@ -287,7 +287,7 @@ The `page.getByLabelText('Username')` locator will find every input in the examp
287287
288288- ` exact: boolean `
289289
290- Whether the ` text ` is matched exactly : case - sensitive and whole - string . Disabled by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
290+ Whether the ` text ` is matched exactly : case - sensitive and whole - string . Defaults to [ ` browser.locators.exact ` ]( / config / browser / locators # browser - locators - exact ), which is ` true ` by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
291291
292292** See also **
293293
@@ -319,7 +319,7 @@ It is generally better to rely on a label using [`getByLabelText`](#getbylabelte
319319
320320- ` exact: boolean `
321321
322- Whether the ` text ` is matched exactly : case - sensitive and whole - string . Disabled by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
322+ Whether the ` text ` is matched exactly : case - sensitive and whole - string . Defaults to [ ` browser.locators.exact ` ]( / config / browser / locators # browser - locators - exact ), which is ` true ` by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
323323
324324** See also **
325325
@@ -351,7 +351,7 @@ This locator is useful for locating non-interactive elements. If you need to loc
351351
352352- ` exact: boolean `
353353
354- Whether the ` text ` is matched exactly : case - sensitive and whole - string . Disabled by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
354+ Whether the ` text ` is matched exactly : case - sensitive and whole - string . Defaults to [ ` browser.locators.exact ` ]( / config / browser / locators # browser - locators - exact ), which is ` true ` by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
355355
356356** See also **
357357
@@ -379,7 +379,7 @@ page.getByTitle('Create') // ❌
379379
380380- ` exact: boolean `
381381
382- Whether the ` text ` is matched exactly : case - sensitive and whole - string . Disabled by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
382+ Whether the ` text ` is matched exactly : case - sensitive and whole - string . Defaults to [ ` browser.locators.exact ` ]( / config / browser / locators # browser - locators - exact ), which is ` true ` by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
383383
384384** See also **
385385
@@ -404,12 +404,6 @@ page.getByTestId('non-existing-element') // ❌
404404It is recommended to use this only after the other locators don ' t work for your use case. Using `data-testid` attributes does not resemble how your software is used and should be avoided if possible.
405405:::
406406
407- ** Options **
408-
409- - ` exact: boolean `
410-
411- Whether the ` text ` is matched exactly : case - sensitive and whole - string . Disabled by default . This option is ignored if ` text ` is a regular expression . Note that exact match still trims whitespace .
412-
413407** See also **
414408
415409- [testing - library ' s `ByTestId`](https://testing-library.com/docs/queries/bytestid/)
0 commit comments