Skip to content

Commit 2f91de5

Browse files
rwollmxschmitt
andauthored
chore: roll Playwright to 1.25.0-alpha-1660067092000 (#1485)
Co-authored-by: Max Schmitt <max@schmitt.mx>
1 parent e1dcfff commit 2f91de5

File tree

4 files changed

+122
-26
lines changed

4 files changed

+122
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H
44

55
| | Linux | macOS | Windows |
66
| :--- | :---: | :---: | :---: |
7-
| Chromium <!-- GEN:chromium-version -->104.0.5112.81<!-- GEN:stop --> ||||
7+
| Chromium <!-- GEN:chromium-version -->105.0.5195.19<!-- GEN:stop --> ||||
88
| WebKit <!-- GEN:webkit-version -->16.0<!-- GEN:stop --> ||||
99
| Firefox <!-- GEN:firefox-version -->103.0<!-- GEN:stop --> ||||
1010

playwright/async_api/_generated.py

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def headers(self) -> typing.Dict[str, str]:
427427
def from_service_worker(self) -> bool:
428428
"""Response.from_service_worker
429429

430-
Indicates whether this Response was fullfilled by a Service Worker's Fetch Handler (i.e. via
430+
Indicates whether this Response was fulfilled by a Service Worker's Fetch Handler (i.e. via
431431
[FetchEvent.respondWith](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith)).
432432

433433
Returns
@@ -2528,7 +2528,7 @@ async def screenshot(
25282528

25292529
Defaults to `"device"`.
25302530
mask : Union[List[Locator], NoneType]
2531-
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
2531+
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
25322532
`#FF00FF` that completely covers its bounding box.
25332533

25342534
Returns
@@ -7995,7 +7995,7 @@ async def screenshot(
79957995

79967996
Defaults to `"device"`.
79977997
mask : Union[List[Locator], NoneType]
7998-
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
7998+
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
79997999
`#FF00FF` that completely covers its bounding box.
80008000

80018001
Returns
@@ -11047,7 +11047,7 @@ async def new_context(
1104711047

1104811048
Creates a new browser context. It won't share cookies/cache with other browser contexts.
1104911049

11050-
> NOTE: If directly using this method to create `BrowserContext`s, it is best practice to explicilty close the returned
11050+
> NOTE: If directly using this method to create `BrowserContext`s, it is best practice to explicitly close the returned
1105111051
context via `browser_context.close()` when your code is done with the `BrowserContext`, and before calling
1105211052
`browser.close()`. This will ensure the `context` is closed gracefully and any artifacts—like HARs and
1105311053
videos—are fully flushed and saved.
@@ -13317,7 +13317,7 @@ async def screenshot(
1331713317

1331813318
Defaults to `"device"`.
1331913319
mask : Union[List[Locator], NoneType]
13320-
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
13320+
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
1332113321
`#FF00FF` that completely covers its bounding box.
1332213322

1332313323
Returns
@@ -14649,14 +14649,38 @@ async def to_contain_text(
1464914649
await expect(locator).to_contain_text(re.compile(r\"\\d messages\"))
1465014650
```
1465114651

14652-
Note that if array is passed as an expected value, entire lists of elements can be asserted:
14652+
If you pass an array as an expected value, the expectations are:
14653+
1. Locator resolves to a list of elements.
14654+
1. Elements from a **subset** of this list contain text from the expected array, respectively.
14655+
1. The matching subset of elements has the same order as the expected array.
14656+
1. Each text value from the expected array is matched by some element from the list.
14657+
14658+
For example, consider the following list:
14659+
14660+
```html
14661+
<ul>
14662+
<li>Item Text 1</li>
14663+
<li>Item Text 2</li>
14664+
<li>Item Text 3</li>
14665+
</ul>
14666+
```
14667+
14668+
Let's see how we can use the assertion:
1465314669

1465414670
```py
14655-
import re
1465614671
from playwright.async_api import expect
1465714672

14658-
locator = page.locator(\"list > .list-item\")
14659-
await expect(locator).to_contain_text([\"Text 1\", \"Text 4\", \"Text 5\"])
14673+
# ✓ Contains the right items in the right order
14674+
await expect(page.locator(\"ul > li\")).to_contain_text([\"Text 1\", \"Text 3\", \"Text 4\"])
14675+
14676+
# ✖ Wrong order
14677+
await expect(page.locator(\"ul > li\")).to_contain_text([\"Text 3\", \"Text 2\"])
14678+
14679+
# ✖ No item contains this text
14680+
await expect(page.locator(\"ul > li\")).to_contain_text([\"Some 33\"])
14681+
14682+
# ✖ Locator points to the outer list element, not to the list items
14683+
await expect(page.locator(\"ul\")).to_contain_text([\"Text 3\"])
1466014684
```
1466114685

1466214686
Parameters
@@ -15231,13 +15255,37 @@ async def to_have_text(
1523115255
await expect(locator).to_have_text(re.compile(r\"Welcome, .*\"))
1523215256
```
1523315257

15234-
Note that if array is passed as an expected value, entire lists of elements can be asserted:
15258+
If you pass an array as an expected value, the expectations are:
15259+
1. Locator resolves to a list of elements.
15260+
1. The number of elements equals the number of expected values in the array.
15261+
1. Elements from the list have text matching expected array values, one by one, in order.
15262+
15263+
For example, consider the following list:
15264+
15265+
```html
15266+
<ul>
15267+
<li>Text 1</li>
15268+
<li>Text 2</li>
15269+
<li>Text 3</li>
15270+
</ul>
15271+
```
15272+
15273+
Let's see how we can use the assertion:
1523515274

1523615275
```py
1523715276
from playwright.async_api import expect
1523815277

15239-
locator = page.locator(\"list > .component\")
15240-
await expect(locator).to_have_text([\"Text 1\", \"Text 2\", \"Text 3\"])
15278+
# ✓ Has the right items in the right order
15279+
await expect(page.locator(\"ul > li\")).to_have_text([\"Text 1\", \"Text 2\", \"Text 3\"])
15280+
15281+
# ✖ Wrong order
15282+
await expect(page.locator(\"ul > li\")).to_have_text([\"Text 3\", \"Text 2\", \"Text 1\"])
15283+
15284+
# ✖ Last item does not match
15285+
await expect(page.locator(\"ul > li\")).to_have_text([\"Text 1\", \"Text 2\", \"Text\"])
15286+
15287+
# ✖ Locator points to the outer list element, not to the list items
15288+
await expect(page.locator(\"ul\")).to_have_text([\"Text 1\", \"Text 2\", \"Text 3\"])
1524115289
```
1524215290

1524315291
Parameters

playwright/sync_api/_generated.py

Lines changed: 60 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def headers(self) -> typing.Dict[str, str]:
429429
def from_service_worker(self) -> bool:
430430
"""Response.from_service_worker
431431

432-
Indicates whether this Response was fullfilled by a Service Worker's Fetch Handler (i.e. via
432+
Indicates whether this Response was fulfilled by a Service Worker's Fetch Handler (i.e. via
433433
[FetchEvent.respondWith](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith)).
434434

435435
Returns
@@ -2554,7 +2554,7 @@ def screenshot(
25542554

25552555
Defaults to `"device"`.
25562556
mask : Union[List[Locator], NoneType]
2557-
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
2557+
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
25582558
`#FF00FF` that completely covers its bounding box.
25592559

25602560
Returns
@@ -8031,7 +8031,7 @@ def screenshot(
80318031

80328032
Defaults to `"device"`.
80338033
mask : Union[List[Locator], NoneType]
8034-
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
8034+
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
80358035
`#FF00FF` that completely covers its bounding box.
80368036

80378037
Returns
@@ -11081,7 +11081,7 @@ def new_context(
1108111081

1108211082
Creates a new browser context. It won't share cookies/cache with other browser contexts.
1108311083

11084-
> NOTE: If directly using this method to create `BrowserContext`s, it is best practice to explicilty close the returned
11084+
> NOTE: If directly using this method to create `BrowserContext`s, it is best practice to explicitly close the returned
1108511085
context via `browser_context.close()` when your code is done with the `BrowserContext`, and before calling
1108611086
`browser.close()`. This will ensure the `context` is closed gracefully and any artifacts—like HARs and
1108711087
videos—are fully flushed and saved.
@@ -13404,7 +13404,7 @@ def screenshot(
1340413404

1340513405
Defaults to `"device"`.
1340613406
mask : Union[List[Locator], NoneType]
13407-
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlayed with a pink box
13407+
Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
1340813408
`#FF00FF` that completely covers its bounding box.
1340913409

1341013410
Returns
@@ -14776,14 +14776,38 @@ def to_contain_text(
1477614776
expect(locator).to_contain_text(re.compile(r\"\\d messages\"))
1477714777
```
1477814778

14779-
Note that if array is passed as an expected value, entire lists of elements can be asserted:
14779+
If you pass an array as an expected value, the expectations are:
14780+
1. Locator resolves to a list of elements.
14781+
1. Elements from a **subset** of this list contain text from the expected array, respectively.
14782+
1. The matching subset of elements has the same order as the expected array.
14783+
1. Each text value from the expected array is matched by some element from the list.
14784+
14785+
For example, consider the following list:
14786+
14787+
```html
14788+
<ul>
14789+
<li>Item Text 1</li>
14790+
<li>Item Text 2</li>
14791+
<li>Item Text 3</li>
14792+
</ul>
14793+
```
14794+
14795+
Let's see how we can use the assertion:
1478014796

1478114797
```py
14782-
import re
1478314798
from playwright.sync_api import expect
1478414799

14785-
locator = page.locator(\"list > .list-item\")
14786-
expect(locator).to_contain_text([\"Text 1\", \"Text 4\", \"Text 5\"])
14800+
# ✓ Contains the right items in the right order
14801+
expect(page.locator(\"ul > li\")).to_contain_text([\"Text 1\", \"Text 3\", \"Text 4\"])
14802+
14803+
# ✖ Wrong order
14804+
expect(page.locator(\"ul > li\")).to_contain_text([\"Text 3\", \"Text 2\"])
14805+
14806+
# ✖ No item contains this text
14807+
expect(page.locator(\"ul > li\")).to_contain_text([\"Some 33\"])
14808+
14809+
# ✖ Locator points to the outer list element, not to the list items
14810+
expect(page.locator(\"ul\")).to_contain_text([\"Text 3\"])
1478714811
```
1478814812

1478914813
Parameters
@@ -15380,13 +15404,37 @@ def to_have_text(
1538015404
expect(locator).to_have_text(re.compile(r\"Welcome, .*\"))
1538115405
```
1538215406

15383-
Note that if array is passed as an expected value, entire lists of elements can be asserted:
15407+
If you pass an array as an expected value, the expectations are:
15408+
1. Locator resolves to a list of elements.
15409+
1. The number of elements equals the number of expected values in the array.
15410+
1. Elements from the list have text matching expected array values, one by one, in order.
15411+
15412+
For example, consider the following list:
15413+
15414+
```html
15415+
<ul>
15416+
<li>Text 1</li>
15417+
<li>Text 2</li>
15418+
<li>Text 3</li>
15419+
</ul>
15420+
```
15421+
15422+
Let's see how we can use the assertion:
1538415423

1538515424
```py
1538615425
from playwright.sync_api import expect
1538715426

15388-
locator = page.locator(\"list > .component\")
15389-
expect(locator).to_have_text([\"Text 1\", \"Text 2\", \"Text 3\"])
15427+
# ✓ Has the right items in the right order
15428+
await expect(page.locator(\"ul > li\")).to_have_text([\"Text 1\", \"Text 2\", \"Text 3\"])
15429+
15430+
# ✖ Wrong order
15431+
await expect(page.locator(\"ul > li\")).to_have_text([\"Text 3\", \"Text 2\", \"Text 1\"])
15432+
15433+
# ✖ Last item does not match
15434+
await expect(page.locator(\"ul > li\")).to_have_text([\"Text 1\", \"Text 2\", \"Text\"])
15435+
15436+
# ✖ Locator points to the outer list element, not to the list items
15437+
await expect(page.locator(\"ul\")).to_have_text([\"Text 1\", \"Text 2\", \"Text 3\"])
1539015438
```
1539115439

1539215440
Parameters

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
InWheel = None
3131
from wheel.bdist_wheel import bdist_wheel as BDistWheelCommand
3232

33-
driver_version = "1.25.0-alpha-1659629898000"
33+
driver_version = "1.25.0-alpha-1660067092000"
3434

3535

3636
def extractall(zip: zipfile.ZipFile, path: str) -> None:

0 commit comments

Comments
 (0)