Playwright

Latest version: v1.44.0

Safety actively analyzes 629503 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 11 of 17

1.13.0

Playwright

- **🖖 Programmatic drag-and-drop support** via the [`page.drag_and_drop()`] API.
- **🔎 Enhanced HAR** with body sizes for requests and responses. Use via `record_har_path` option in [`browser.new_context()`].

Tools

- Playwright Trace Viewer now shows parameters, returned values and `console.log()` calls.
- Playwright Inspector can generate Playwright Test tests.

New and Overhauled Guides

- [Intro](https://playwright.dev/python/docs/next/intro/)
- [Authentication](https://playwright.dev/docs/next/auth)
- [Chome Extensions](https://playwright.dev/docs/next/chrome-extensions)
- [Playwright Test Configuration](https://playwright.dev/docs/next/test-configuration)
- [Playwright Test Annotations](https://playwright.dev/docs/next/test-annotations)
- [Playwright Test Fixtures](https://playwright.dev/docs/next/test-fixtures)

Browser Versions

- Chromium 93.0.4576.0
- Mozilla Firefox 90.0
- WebKit 14.2

New Playwright APIs

- new `baseURL` option in [`browser.new_context()`] and [`browser.new_page()`]
- [`response.security_details()`] and [`response.server_addr()`]
- [`page.drag_and_drop()`] and [`frame.drag_and_drop()`]
- [`download.cancel()`]
- [`page.input_value()`], [`frame.input_value()`] and [`element_handle.input_value()`]
- new `force` option in [`page.fill()`], [`frame.fill()`], and [`element_handle.fill()`]
- new `force` option in [`page.select_option()`], [`frame.select_option()`], and [`element_handle.select_option()`]

[`download.cancel()`]: https://playwright.dev/python/docs/next/api/class-download#download-cancel

[`page.fill()`]: https://playwright.dev/python/docs/next/api/class-page#page-fill
[`frame.fill()`]: https://playwright.dev/python/docs/next/api/class-frame#frame-fill
[`element_handle.fill()`]: https://playwright.dev/python/docs/next/api/class-elementhandle#element-handle-fill

[`page.input_value()`]: https://playwright.dev/python/docs/next/api/class-page#page-input-value
[`frame.input_value()`]: https://playwright.dev/python/docs/next/api/class-frame#frame-input-value
[`element_handle.input_value()`]: https://playwright.dev/python/docs/next/api/class-elementhandle#element-handle-input-value

[`page.select_option()`]: https://playwright.dev/python/docs/next/api/class-page#page-select-option
[`frame.select_option()`]: https://playwright.dev/python/docs/next/api/class-frame#frame-select-option
[`element_handle.select_option()`]: https://playwright.dev/python/docs/next/api/class-elementhandle#element-handle-select-option

[`page.drag_and_drop()`]: https://playwright.dev/python/docs/next/api/class-page#page-drag-and-drop
[`frame.drag_and_drop()`]: https://playwright.dev/python/docs/next/api/class-frame#frame-drag-and-drop

[`response.security_details()`]: https://playwright.dev/python/docs/next/api/class-response#response-security-details
[`response.server_addr()`]: https://playwright.dev/python/docs/next/api/class-response#response-server-addr

[`browser.new_context()`]: https://playwright.dev/python/docs/next/api/class-browser#browser-new-context
[`browser.new_page()`]: https://playwright.dev/python/docs/next/api/class-browser#browser-new-page

1.12.1

Highlights

This patch release includes bugfixes for the following issues:

https://github.com/microsoft/playwright/issues/7015 - [BUG] Firefox: strange undefined toJSON property on JS objects
https://github.com/microsoft/playwright/issues/7048 - [BUG] Dialogs cannot be dismissed if tracing is on in Chromium or Webkit
https://github.com/microsoft/playwright/issues/7058 - [BUG] Getting no video frame error for mobile chrome

Browser Versions

- Chromium 93.0.4530.0
- Mozilla Firefox 89.0
- WebKit 14.2

This version of Playwright was also tested against the following stable channels:

- Google Chrome 91
- Microsoft Edge 91

1.12.0

🧟‍♂️ Introducing Playwright Trace & TraceViewer

[Playwright Trace Viewer](https://playwright.dev/python/docs/next/trace-viewer) is a new GUI tool that helps exploring recorded Playwright traces after the script ran. Playwright traces let you examine:
- page DOM before and after each Playwright action
- page rendering before and after each Playwright action
- browse network during script execution

Traces are recorded using the new [`browser_context.tracing`] API:

python
browser = chromium.launch()
context = browser.new_context()

Start tracing before creating / navigating a page.
context.tracing.start(screenshots=True, snapshots=True)

page.goto("https://playwright.dev")

Stop tracing and export it into a zip archive.
context.tracing.stop(path = "trace.zip")


Traces are examined later with the Playwright CLI:


sh
playwright show-trace trace.zip


That will open the following GUI:

![image](https://user-images.githubusercontent.com/746130/121109654-d66c4480-c7c0-11eb-8d4d-eb70d2b03811.png)

👉 Read more in [trace viewer documentation](https://playwright.dev/python/docs/next/trace-viewer).

---

Browser Versions

- Chromium 93.0.4530.0
- Mozilla Firefox 89.0
- WebKit 14.2

This version of Playwright was also tested against the following stable channels:

- Google Chrome 91
- Microsoft Edge 91

New APIs

- `reduced_motion` option in [`page.emulate_media()`], [`browser_type.launch_persistent_context()`], [`browser.new_context()`] and [`browser.new_page()`]
- [`browser_context.on("request")`]
- [`browser_context.on("requestfailed")`]
- [`browser_context.on("requestfinished")`]
- [`browser_context.on("response")`]
- `traces_dir` option in [`browser_type.launch()`] and [`browser_type.launch_persistent_context()`]
- new [`browser_context.tracing`] API namespace
- new [`download.page`] getter


[`page.emulate_media()`]: https://playwright.dev/python/docs/next/api/class-page#page-emulate-media
[`browser_type.launch_persistent_context()`]: https://playwright.dev/python/docs/next/api/class-browsertype#browser-type-launch-persistent-context
[`browser_context.tracing`]: https://playwright.dev/python/docs/next/api/class-browsercontext#browser-context-tracing
[`download.page`]: https://playwright.dev/python/docs/next/api/class-download#download-page
[`browser_type.launch()`]: https://playwright.dev/python/docs/next/api/class-browsertype
[`browser.new_context()`]: https://playwright.dev/python/docs/next/api/class-browser#browser-new-context
[`browser.new_page()`]: https://playwright.dev/python/docs/next/api/class-browser#browser-new-page
[`browser_context.on("request")`]: https://playwright.dev/python/docs/next/api/class-browsercontext#browser-context-event-request
[`browser_context.on("requestfailed")`]: https://playwright.dev/python/docs/next/api/class-browsercontext#browser-context-event-request-failed
[`browser_context.on("requestfinished")`]: https://playwright.dev/python/docs/next/api/class-browsercontext#browser-context-event-request-finished
[`browser_context.on("response")`]: https://playwright.dev/python/docs/next/api/class-browsercontext#browser-context-event-response

1.11.2

Highlights

This patch includes bug fixes across all languages for the following issues:
- https://github.com/microsoft/playwright-python/issues/679 - can't get browser's context pages after connect_over_cdp
- https://github.com/microsoft/playwright-java/issues/432 - [Bug] Videos are not complete when an exception is thrown

Browser Versions

- Chromium 92.0.4498.0
- Mozilla Firefox 89.0b6
- WebKit 14.2

This version of Playwright was also tested against the following stable channels:

- Google Chrome 90
- Microsoft Edge 90

1.11.1

Highlights

🐧 Deploy [v1.11](https://github.com/microsoft/playwright-python/releases/tag/v1.11.0) on PIP for Ubuntu users
🐍 Release Playwright-Python on Anaconda: https://anaconda.org/Microsoft/playwright

Browser Versions

- Chromium 92.0.4498.0
- Mozilla Firefox 89.0b6
- WebKit 14.2

This version of Playwright was also tested against the following stable channels:

- Google Chrome 90
- Microsoft Edge 90

1.11.0

Highlights

🎥 New video: [Playwright: A New Test Automation Framework for the Modern Web](https://youtu.be/_Jla6DyuEu4) ([slides](https://docs.google.com/presentation/d/1xFhZIJrdHkVe2CuMKOrni92HoG2SWslo0DhJJQMR1DI/edit?usp=sharing))
- We talked about Playwright
- Showed engineering work behind the scenes
- Did live demos with new features ✨
- **Special thanks** to [applitools](http://applitools.com/) for hosting the event and inviting us!

⚙️ Chrome DevTools Protocol support with [`browser_type.connect_over_cdp()`].

Browser Versions

- Chromium 92.0.4498.0
- Mozilla Firefox 89.0b6
- WebKit 14.2

This version of Playwright was also tested against the following stable channels:

- Google Chrome 90
- Microsoft Edge 90

New APIs


- new **emulation devices**: Galaxy S8, Galaxy S9+, Galaxy Tab S4, Pixel 3, Pixel 4
- new methods:
* [`browser_type.connect_over_cdp()`] to connect using Chrome DevTools protocol
* [`browser_type.connect()`] to connect to a Playwright server
* [`page.wait_for_url()`] to ensure navigations to URL
* [`video.delete()`] and [`video.save_as()`] to manage screen recording
- new options:
* `screen` option in the [`browser.new_context()`] method to emulate `window.screen` dimensions
* `position` option in [`page.check()`] and [`page.uncheck()`] methods
* `trial` option to dry-run actions in [`page.check()`], [`page.uncheck()`], [`page.click()`], [`page.dblclick()`], [`page.hover()`] and [`page.tap()`]
* `headers` option in [`browser_type.connect()`]


[`browser.new_context()`]: https://playwright.dev/python/docs/next/api/class-browser#browsernew_contextkwargs
[`page.wait_for_url()`]: https://playwright.dev/python/docs/next/api/class-page#pagewait_for_urlurl-kwargs
[`video.delete()`]: https://playwright.dev/python/docs/next/api/class-video#videodelete
[`video.save_as()`]: https://playwright.dev/python/docs/next/api/class-video#videosave_aspath
[`page.click()`]: https://playwright.dev/python/docs/next/api/class-page#pageclickselector-kwargs
[`page.check()`]: https://playwright.dev/python/docs/next/api/class-page#pagecheckselector-kwargs
[`page.uncheck()`]: https://playwright.dev/python/docs/next/api/class-page#pageuncheckselector-kwargs
[`page.dblclick()`]: https://playwright.dev/python/docs/next/api/class-page#pagedblclickselector-kwargs
[`page.hover()`]: https://playwright.dev/python/docs/next/api/class-page#pagehoverselector-kwargs
[`browser_type.connect()`]: https://playwright.dev/python/docs/next/api/class-browsertype#browser_typeconnectws_endpoint-kwargs
[`page.tap()`]: https://playwright.dev/python/docs/next/api/class-page#pagetapselector-kwargs
[`browser_type.connect()`]: https://playwright.dev/python/docs/next/api/class-browsertype#browser_typeconnectws_endpoint-kwargs
[`browser_type.connect_over_cdp()`]: https://playwright.dev/python/docs/next/api/class-browsertype#browser_typeconnect_over_cdpendpoint_url-kwargs

Page 11 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.