@@ -9615,7 +9615,8 @@ async def new_context(
9615
9615
record_video_dir : typing .Union [str , pathlib .Path ] = None ,
9616
9616
record_video_size : ViewportSize = None ,
9617
9617
storage_state : typing .Union [StorageState , str , pathlib .Path ] = None ,
9618
- base_url : str = None
9618
+ base_url : str = None ,
9619
+ strict_selectors : bool = None
9619
9620
) -> "BrowserContext" :
9620
9621
"""Browser.new_context
9621
9622
@@ -9709,6 +9710,10 @@ async def new_context(
9709
9710
Examples:
9710
9711
- baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
9711
9712
- baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in `http://localhost:3000/foo/bar.html`
9713
+ strict_selectors : Union[bool, NoneType]
9714
+ It specified, enables strict selectors mode for this context. In the strict selectors mode all operations on selectors
9715
+ that imply single target DOM element will throw when more than one element matches the selector. See `Locator` to learn
9716
+ more about the strict mode.
9712
9717
9713
9718
Returns
9714
9719
-------
@@ -9747,6 +9752,7 @@ async def new_context(
9747
9752
recordVideoSize = record_video_size ,
9748
9753
storageState = storage_state ,
9749
9754
baseURL = base_url ,
9755
+ strictSelectors = strict_selectors ,
9750
9756
),
9751
9757
)
9752
9758
)
@@ -9781,7 +9787,8 @@ async def new_page(
9781
9787
record_video_dir : typing .Union [str , pathlib .Path ] = None ,
9782
9788
record_video_size : ViewportSize = None ,
9783
9789
storage_state : typing .Union [StorageState , str , pathlib .Path ] = None ,
9784
- base_url : str = None
9790
+ base_url : str = None ,
9791
+ strict_selectors : bool = None
9785
9792
) -> "Page" :
9786
9793
"""Browser.new_page
9787
9794
@@ -9870,6 +9877,10 @@ async def new_page(
9870
9877
Examples:
9871
9878
- baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
9872
9879
- baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in `http://localhost:3000/foo/bar.html`
9880
+ strict_selectors : Union[bool, NoneType]
9881
+ It specified, enables strict selectors mode for this context. In the strict selectors mode all operations on selectors
9882
+ that imply single target DOM element will throw when more than one element matches the selector. See `Locator` to learn
9883
+ more about the strict mode.
9873
9884
9874
9885
Returns
9875
9886
-------
@@ -9908,6 +9919,7 @@ async def new_page(
9908
9919
recordVideoSize = record_video_size ,
9909
9920
storageState = storage_state ,
9910
9921
baseURL = base_url ,
9922
+ strictSelectors = strict_selectors ,
9911
9923
),
9912
9924
)
9913
9925
)
@@ -10218,7 +10230,8 @@ async def launch_persistent_context(
10218
10230
record_har_omit_content : bool = None ,
10219
10231
record_video_dir : typing .Union [str , pathlib .Path ] = None ,
10220
10232
record_video_size : ViewportSize = None ,
10221
- base_url : str = None
10233
+ base_url : str = None ,
10234
+ strict_selectors : bool = None
10222
10235
) -> "BrowserContext" :
10223
10236
"""BrowserType.launch_persistent_context
10224
10237
@@ -10345,6 +10358,10 @@ async def launch_persistent_context(
10345
10358
Examples:
10346
10359
- baseURL: `http://localhost:3000` and navigating to `/bar.html` results in `http://localhost:3000/bar.html`
10347
10360
- baseURL: `http://localhost:3000/foo/` and navigating to `./bar.html` results in `http://localhost:3000/foo/bar.html`
10361
+ strict_selectors : Union[bool, NoneType]
10362
+ It specified, enables strict selectors mode for this context. In the strict selectors mode all operations on selectors
10363
+ that imply single target DOM element will throw when more than one element matches the selector. See `Locator` to learn
10364
+ more about the strict mode.
10348
10365
10349
10366
Returns
10350
10367
-------
@@ -10397,6 +10414,7 @@ async def launch_persistent_context(
10397
10414
recordVideoDir = record_video_dir ,
10398
10415
recordVideoSize = record_video_size ,
10399
10416
baseURL = base_url ,
10417
+ strictSelectors = strict_selectors ,
10400
10418
),
10401
10419
)
10402
10420
)
0 commit comments