Playwright

Latest version: v1.49.0

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

Scan your dependencies

Page 20 of 32

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.3

Highlights

This patch release includes bug fixes for the following issues:

7085 - [BUG] Traceviewer screens are not recorded well when using constructable stylesheets
7093 - Folder for a test-case is getting generated in test-results even if Test Case Passes when properties are given on Failure
7099 - [test-runner] Missing types for the expect library
7124 - [Test Runner] config.outputDir must be an absolute path
7141 - [Feature] Options for video resolution
7163 - [Test runner] artifacts are removed
7223 - [BUG] test-runner viewport can't be null
7284 - [BUG] incorrect playwright/test typings for toMatchSnapshot/toMatchInlineSnapshot/etc
7304 - [BUG] Snapshots are not captured if there is an animation at the beginning
7326 - [BUG] When PW timeouts, last trace action does not get collected[BUG] When PW timeouts, last trace action does not get collected


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.2

Highlights

This patch release includes bugfixes for the following issues:

- 7015 - [BUG] Firefox: strange undefined toJSON property on JS objects
- 7004 - [test runner] Error: Error while reading global-setup.ts: Cannot find module 'global-setup.ts'
- 7048 - [BUG] Dialogs cannot be dismissed if tracing is on in Chromium or Webkit
- 7058 - [BUG] Getting no video frame error for mobile chrome
- 7020 - [Feature] Codegen should be able to emit playwright/test syntax

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.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

Page 20 of 32

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.