Skip to content

v1.51.0

Compare
Choose a tag to compare
@mxschmitt mxschmitt released this 18 Mar 09:08

Highlights

  • New option indexed_db for browserContext.storage_state() allows to save and restore IndexedDB contents. Useful when your application uses IndexedDB API to store authentication tokens, like Firebase Authentication.

    Here is an example following the authentication guide:

    # Save storage state into the file. Make sure to include IndexedDB.
    storage = context.storage_state(path="state.json", indexed_db=True)
    
    # Create a new context with the saved storage state.
    context = browser.new_context(storage_state="state.json")
  • New option visible for locator.filter() allows matching only visible elements.

    # Ignore invisible todo items.
    todo_items = page.get_by_test_id("todo-item").filter(visible=True)
    # Check there are exactly 3 visible ones.
    expect(todo_items).to_have_count(3)
  • New option contrast for methods page.emulate_media() and browser.new_context() allows to emulate the prefers-contrast media feature.

  • New option fail_on_status_code makes all fetch requests made through the APIRequestContext throw on response codes other than 2xx and 3xx.

Browser Versions

  • Chromium 134.0.6998.35
  • Mozilla Firefox 135.0
  • WebKit 18.4

This version was also tested against the following stable channels:

  • Google Chrome 133
  • Microsoft Edge 133
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy