Skip to content

Commit af0d293

Browse files
committed
cherry-pick(#17912): docs: mention that exact option is ignored for regex
1 parent c05225f commit af0d293

File tree

2 files changed

+41
-21
lines changed

2 files changed

+41
-21
lines changed

docs/src/api/params.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ Text to locate the element for.
10741074
* since: v1.27
10751075
- `exact` <[boolean]>
10761076

1077-
Whether to find an exact match: case-sensitive and whole-string. Default to false.
1077+
Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression.
10781078

10791079
## locator-get-by-role-role
10801080
* since: v1.27

packages/playwright-core/types/types.d.ts

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2457,7 +2457,8 @@ export interface Page {
24572457
*/
24582458
getByAltText(text: string|RegExp, options?: {
24592459
/**
2460-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
2460+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
2461+
* expression.
24612462
*/
24622463
exact?: boolean;
24632464
}): Locator;
@@ -2476,7 +2477,8 @@ export interface Page {
24762477
*/
24772478
getByLabel(text: string|RegExp, options?: {
24782479
/**
2479-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
2480+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
2481+
* expression.
24802482
*/
24812483
exact?: boolean;
24822484
}): Locator;
@@ -2494,7 +2496,8 @@ export interface Page {
24942496
*/
24952497
getByPlaceholder(text: string|RegExp, options?: {
24962498
/**
2497-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
2499+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
2500+
* expression.
24982501
*/
24992502
exact?: boolean;
25002503
}): Locator;
@@ -2589,7 +2592,8 @@ export interface Page {
25892592
*/
25902593
getByText(text: string|RegExp, options?: {
25912594
/**
2592-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
2595+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
2596+
* expression.
25932597
*/
25942598
exact?: boolean;
25952599
}): Locator;
@@ -2606,7 +2610,8 @@ export interface Page {
26062610
*/
26072611
getByTitle(text: string|RegExp, options?: {
26082612
/**
2609-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
2613+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
2614+
* expression.
26102615
*/
26112616
exact?: boolean;
26122617
}): Locator;
@@ -5543,7 +5548,8 @@ export interface Frame {
55435548
*/
55445549
getByAltText(text: string|RegExp, options?: {
55455550
/**
5546-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
5551+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
5552+
* expression.
55475553
*/
55485554
exact?: boolean;
55495555
}): Locator;
@@ -5562,7 +5568,8 @@ export interface Frame {
55625568
*/
55635569
getByLabel(text: string|RegExp, options?: {
55645570
/**
5565-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
5571+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
5572+
* expression.
55665573
*/
55675574
exact?: boolean;
55685575
}): Locator;
@@ -5580,7 +5587,8 @@ export interface Frame {
55805587
*/
55815588
getByPlaceholder(text: string|RegExp, options?: {
55825589
/**
5583-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
5590+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
5591+
* expression.
55845592
*/
55855593
exact?: boolean;
55865594
}): Locator;
@@ -5675,7 +5683,8 @@ export interface Frame {
56755683
*/
56765684
getByText(text: string|RegExp, options?: {
56775685
/**
5678-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
5686+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
5687+
* expression.
56795688
*/
56805689
exact?: boolean;
56815690
}): Locator;
@@ -5692,7 +5701,8 @@ export interface Frame {
56925701
*/
56935702
getByTitle(text: string|RegExp, options?: {
56945703
/**
5695-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
5704+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
5705+
* expression.
56965706
*/
56975707
exact?: boolean;
56985708
}): Locator;
@@ -9966,7 +9976,8 @@ export interface Locator {
99669976
*/
99679977
getByAltText(text: string|RegExp, options?: {
99689978
/**
9969-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
9979+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
9980+
* expression.
99709981
*/
99719982
exact?: boolean;
99729983
}): Locator;
@@ -9985,7 +9996,8 @@ export interface Locator {
99859996
*/
99869997
getByLabel(text: string|RegExp, options?: {
99879998
/**
9988-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
9999+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
10000+
* expression.
998910001
*/
999010002
exact?: boolean;
999110003
}): Locator;
@@ -10003,7 +10015,8 @@ export interface Locator {
1000310015
*/
1000410016
getByPlaceholder(text: string|RegExp, options?: {
1000510017
/**
10006-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
10018+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
10019+
* expression.
1000710020
*/
1000810021
exact?: boolean;
1000910022
}): Locator;
@@ -10098,7 +10111,8 @@ export interface Locator {
1009810111
*/
1009910112
getByText(text: string|RegExp, options?: {
1010010113
/**
10101-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
10114+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
10115+
* expression.
1010210116
*/
1010310117
exact?: boolean;
1010410118
}): Locator;
@@ -10115,7 +10129,8 @@ export interface Locator {
1011510129
*/
1011610130
getByTitle(text: string|RegExp, options?: {
1011710131
/**
10118-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
10132+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
10133+
* expression.
1011910134
*/
1012010135
exact?: boolean;
1012110136
}): Locator;
@@ -15221,7 +15236,8 @@ export interface FrameLocator {
1522115236
*/
1522215237
getByAltText(text: string|RegExp, options?: {
1522315238
/**
15224-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
15239+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
15240+
* expression.
1522515241
*/
1522615242
exact?: boolean;
1522715243
}): Locator;
@@ -15240,7 +15256,8 @@ export interface FrameLocator {
1524015256
*/
1524115257
getByLabel(text: string|RegExp, options?: {
1524215258
/**
15243-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
15259+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
15260+
* expression.
1524415261
*/
1524515262
exact?: boolean;
1524615263
}): Locator;
@@ -15258,7 +15275,8 @@ export interface FrameLocator {
1525815275
*/
1525915276
getByPlaceholder(text: string|RegExp, options?: {
1526015277
/**
15261-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
15278+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
15279+
* expression.
1526215280
*/
1526315281
exact?: boolean;
1526415282
}): Locator;
@@ -15353,7 +15371,8 @@ export interface FrameLocator {
1535315371
*/
1535415372
getByText(text: string|RegExp, options?: {
1535515373
/**
15356-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
15374+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
15375+
* expression.
1535715376
*/
1535815377
exact?: boolean;
1535915378
}): Locator;
@@ -15370,7 +15389,8 @@ export interface FrameLocator {
1537015389
*/
1537115390
getByTitle(text: string|RegExp, options?: {
1537215391
/**
15373-
* Whether to find an exact match: case-sensitive and whole-string. Default to false.
15392+
* Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular
15393+
* expression.
1537415394
*/
1537515395
exact?: boolean;
1537615396
}): Locator;

0 commit comments

Comments
 (0)