Playwright v0.11.0 Release Notes

Release Date: 2020-02-14 // about 4 years ago
  • Current Status

    • Chromium 82.0.4057.0. Passes 99% (792/802) tests
    • Webkit 13.0.4. Passes 99% (792/802) tests
    • Firefox 73.0b13. Passes 95% (763/802) tests

    Detailed status can be found at IsPlayWrightReady?

    ๐Ÿ’ฅ Breaking API Changes

    ๐Ÿ’ป browserType.launch has changed. Playwright now launches in 3 modes:

    โœ… browserType.launch - default mode for testing. Each test should start with browser.newContext to obtain a clean environment. All new contexts are ephemeral, not persisted into the profile directory. It no longer accepts userDataDir option. There is no notion of the defaultContext anymore.
    ๐Ÿ (Note: you will still see an empty default context window when you run playwright in the headful mode. This is a side-effect of running the stock browsers. We are working on changing this behavior upstream so that clear Playwright run in this mode has no open windows on launch.)

    0๏ธโƒฃ browserType.launchPersistent - default mode for headful operations and those reusing the user profile. Instead of returning the Browser, it returns the BrowserContext loaded from the user data dir right away. It requires userDataDir to be passed as the first parameter.

    โœ… browserType.launchServer - returns a BrowserServer (formerly known as BrowserApp) that can be connected to via the browserType.connect. Multiple clients can connect to the same server. Closing the Browser disconnects from the server. This mode is useful for certain test runner setups.

    Request interception

    ๐Ÿ page.setRequestInterception is replaced with the page.route. New method accepts the pattern of the urls to be intercepted and handles interception in place, instead of using the page.on('request') event. Note that we intend to move this method into the BrowserContext over time to make sure it affects popup windows.

    Viewport

    ๐Ÿ“„ page.setViewport is renamed to page.setViewportSize. It only allows resizing the viewport, does not allow changing it from mobile to desktop on the fly. Old method was making an implicit reload when switching device type and we did not want that to happen.

    ๐Ÿ“„ page.viewport() is renamed to page.viewportSize()

    ๐Ÿ†• New APIs

    ๐Ÿ†• new browser.newPage - convenience method that creates a new context and a page inside that context. Closing the page closes the context. Useful when you only run single-page tests in your contexts.

    ๐Ÿ†• new page.check() and page.uncheck() - toggle your checkboxes.

    ๐Ÿ†• new browserContext.on('close') event - tells when the context is destroyed (disconnected from the server).

    ๐Ÿ†• new browserType.downloadBrowserIfNeeded() - when you use playwright-core npm that does not download browser by default, you can use this method to fetch them on demand.

    ๐Ÿ†• new frame.frameElement() method

    ๐Ÿ†• new page.route - substituted the page.setRequestInterception api.

    ๐Ÿ†• new page.viewportSize() - used instead of page.viewport.

    ๐Ÿ“ฆ In addition to this, all playwright packages now expose the same API and are only different in
    ๐Ÿ’ป the set of browsers they download:

    ๐Ÿ› Bug Fixes

    ๐Ÿ #808 - [BUG] rimraf causes failure with multiple browsers on Windows
    #814 - [BUG] playwright- and playwright have different export signatures
    #817 - [Feature] XPath staring with "(//" should be detected as such
    ๐Ÿ’ป #823 - [Feature] Allow skipping specific browser downloads
    #839 - [Feature] Frame.frameElement
    #857 - [BUG] Firefox: bundle ff-specific preferences with binary
    #887 - [BUG] Cannot read property 'width' of null for Webkit screenshot
    ๐ŸŽ #914 - [BUG and temporary fix] Open Firefox as the frontmost window (macOS-specific)
    ๐Ÿ #942 - [BUG] WebKit under debug crashes on Windows
    #955 - [Feature] Expose Rawer V8 coverage information
    #979 - [BUG] Missing blur and focus events

    Raw Notes

    ๐Ÿš€ d29625c - chore: generate browser versions when doing release (#999)
    โœ… 1eabd18 - test(firefox): unskip passing url hash test (#998)
    ๐Ÿ b041ce6 - devops: enable debugging on WK Windows
    ๐Ÿ 4d7e531 - fix(webkit): wait for the pipe ready on windows (#997)
    cd4e9da - feat(coverage): export raw v8 coverage (#976)
    โœ… 7ec3bf4 - test: fix locale tests on mac
    โœ… b181b34 - test: attempt to normalize locale tests
    โœ… b96d985 - test: fix locale expectations on non-Mac (#994)
    0๏ธโƒฃ 25022e4 - feat(api): introduce default timeouts on BrowserContext (#992)
    e744c53 - chore(webkit): bump webkit version to 1150 (#991)
    ๐Ÿ f7fb35b - fix(windows): wait for pipe available again (#993)
    โช f8f818f - Revert "Revert "feat: do not wait for first page in non-persistent mode (#939)""
    โช 71892b4 - Revert "feat: do not wait for first page in non-persistent mode (#939)"
    c15534f - fix(locale): document locale parameter (#990)
    โœ… cb63021 - test: add test for navigator.userAgent in popups (#985)
    โœ… 05f8d00 - test: fix service worker test (#988)
    โœ… 2e0d89e - fix(firefox): roll to 1029 and unskip passing tests (#984)
    โœ… d790b4c - fix(test): default DEBUGP to false (#989)
    ๐Ÿ’ป 8ed88c9 - feat(webkit): introduce BrowserContext({language}) (#972)
    8006b2c - fix(webkit): avoid UnhandledPromiseRejection (#986)
    ๐Ÿ’ป 991b89f - browser(webkit): rebase WebKit on r256488 (#973)
    53fa629 - fix(): emit focus events in headful (#982)
    a567123 - feat: do not wait for first page in non-persistent mode (#939)
    ๐Ÿ’ป c2ab1e3 - browser(firefox): misc fixes (#983)
    โœ… d367a2e - chore(tests): log protocol messages when a test fails on the bots (#963)
    8abf35c - feat(webkit): roll webkit to 1148 (#971)
    ๐Ÿ’ป d735de5 - feat: do not let users pass userDataDir to browserType.launch() (#974)
    ๐Ÿ’ป b7f48f4 - browser(webkit): layout before returning DOM.getContentQuads (#970)
    b188f39 - devops: do not assume that checkout exists
    ๐Ÿ–จ 5dbc880 - browser(webkit): print friendly tz names (#969)
    ๐Ÿšš c19a7be - chore: remove stub types definition
    012bf67 - feat(webkit): emulate timezone on webkit (#968)
    d26f47b - fix(platform): properly handle websocket error events (#967)
    โœ… fbce290 - test: unskip passing Firefox tests (#966)
    ๐Ÿ“„ aa60a7c - docs(api.md): fix nit
    โœ… bfaf191 - test: add missing tests (#965)
    1d84f38 - fix(input): ensure input works as expected with page scale (#962)
    ee9748b - feat(): roll chromium to r740847 (#964)
    ๐Ÿšš 7ce49c2 - chore: remove WebSocket implementation (#961)
    b0c0598 - fix(api): small-case all api event names (#959)
    ๐Ÿ’ป 44941ad - browser(webkit): emulate time zone (#960)
    ๐Ÿง 1945ed7 - devops: run API coverage tests on linux (#958)
    ๐Ÿ’ป 211cba4 - browser(webkit): use css (not dip) coordinates for input and content quads (#957)
    79c4763 - feat(webkit): roll to r1145 (#954)
    5956df5 - devops: re-factor github workflow internal structure (#956)
    โœ… 5f24205 - test: add a test for interception + service worker (#951)
    ๐Ÿ— a4d0187 - chore: mac build bots (#734)
    ๐Ÿ‘• 1f29930 - devops: add docs & lint github workflow (#953)
    ๐Ÿ‘• 0de625d - Revert "devops: add docs & lint github workflow"
    ๐Ÿ‘• 7ec7f72 - devops: add docs & lint github workflow
    ๐Ÿšš 9bbaa32 - browser(webkit): remove assert (#952)
    ๐Ÿ‘ท 3007541 - browser(webkit): do not intercept requests on the way to service worker (#948)
    โœ… c8c4356 - test: add setInputFiles input event test (#944)
    d05feec - feat(active): emulate active state on webkit (#941)
    0d16d14 - fix(firefox): rely on bundled firefox preferences (#943)
    ๐Ÿ’ป da30847 - feat(firefox): apply emulation to all pages in the browser context (#931)
    ๐Ÿ’ป 90367c1 - browser(webkit): emulate active and focused state (#940)
    โœ… f25a27a - test: add a test for bounding box with page scale (#935)
    ๐Ÿ ce38213 - browser(webkit): disregard dpi on windows (#938)
    0๏ธโƒฃ d37b67a - browser(firefox): do not wait for initial navigation in default context (#937)
    ๐Ÿ— efa567d - devops: fix firefox preferences build on mac
    451ec72 - feat(): roll Chromium to r740289 (#936)
    โœ… 20e2bac - test: fix flaky page event test
    5323700 - feat($wait): make $wait a shortcut for waitForSelector (#932)
    ๐Ÿ— 3a32b14 - devops: bundle firefox preferences alongside with build.
    โœ… 6105d8a - fix(tests): fix test that was leaking a context (#933)
    ๐Ÿ’ป aae5fca - feat(api): make browser.newPage own the created context (#930)
    ๐Ÿ’ป ad9d6cc - feat: introduce browserType.downloadBrowserIfNeeded() (#834)
    ๐Ÿ’ป 9ea8f49 - browser(firefox): attach to all pages in the browser context (#928)
    8a35f40 - fix(events): deliver page.close upon disconnect in FF (#929)
    ๐Ÿ‘• c69dccf - feat(click): use browser-provided scrollIntoViewIfNeeded (#893)
    ๐Ÿ’ป 72b9cf0 - feat(context): introduce BrowserContext close event (#918)
    โœ… 5fee93a - test: fix expect in jshandle spec (#927)
    7802354 - fix(firefox): bring headful window to front on launch (#923)
    49eea19 - feat(webkit): roll webkit to 1141 (#922)
    ๐Ÿ’ป 29f4f18 - browser(webkit): allow beforeunload override when headful (#921)
    ๐Ÿšš 251ad38 - fix(navigations): remove LifecycleWatcher, fix flakes (#882)
    โœ… c03e8b7 - chore(tests): add types for tests (#915)
    9da0229 - chore: bump rimraf to 3.0.2 (#916)
    ๐Ÿšš 4fcc63f - chore: remove usages of mime module from infrastructure
    ๐Ÿšš 84f5700 - feat(api): rename browserContext() to context() in the apis, remove url from newPage (#906)
    4d84e35 - fix(upload): detect mime type from file extension (#911)
    0๏ธโƒฃ 79b7a84 - fix(screenshot): be careful w/ default viewport, extract common logic (#913)
    ๐Ÿšš 2dd11ea - docs: remove browser.newPage from README
    โšก๏ธ 50f96eb - docs: update readme to address browser changes questions
    ๐Ÿ e9c1477 - fix(webkit): fix remaining tests on windows (#905)
    โœ… f4734ef - feat(testrunner): show workerId in verbose mode
    d71c9e0 - feat(webkit): roll webkit to r1140 (#904)
    ๐Ÿ’ป e2710de - browser(webkit): do not activate headless window on browser start (#900)
    โœ… 36344de - tests: consistently use platform constants (#899)
    ๐Ÿ— 3acc65d - devops: teach //browser_patches/webkit/build.sh to build both GTK & WPE
    ๐Ÿ‘• 73148fd - chore(lint): add @typescript-eslint/no-unnecessary-type-assertion rule (#898)
    ๐Ÿ‘• 487d394 - chore(lint): add @typescript-eslint/type-annotation-spacing rule (#897)
    8712359 - devops: prettify telegram messages
    42c2cfc - fix(pipe): sort out pipes on platforms (#895)
    0ed43e8 - feat(webkit) await the reading from pipe message (#894)
    ๐Ÿ’ป cdbfc4c - browser(webkit): report inspector pipe is listening via stdout (#892)
    ๐Ÿ’ป 8c2302d - browser(webkit): do not navigate popups to about:blank on Win (#886)
    d397bb1 - feat(): roll chromium to r739261 (#885)
    fe2431e - feat(webkit): roll webkit to r1137 (#884)
    fee83b1 - fix(api): page.viewport -> page.viewportSize (#878)
    ๐Ÿ’ป c33a12d - feat(firefox): ensure that new pages get browser context userAgent option (#872)
    ๐Ÿ’ป bc91259 - browser(webkit): use random ephemeral session ids on Mac (#881)
    ๐Ÿ“„ 06a7d7e - docs(api.md): missing arguments for functions in page.route (#880)
    ๐Ÿ’ป f15690d - browser(webkit): roll WebKit to tip-of-tree 2/6/2020 (#877)
    ๐Ÿ‘• ffc1022 - fix(doclint): fix doclint for new typescript (#879)
    ๐Ÿ— ffc8f96 - browser(firefox): bump build number to r1025
    ๐Ÿ’ป 9f0bbff - browser(firefox): pause page on creation to handle emulation messages (#871)
    75340f3 - chore: Note that (code) coverage is only available for (#867)
    ๐Ÿ’ป 8c6faab - browser(firefox): roll firefox to upstream's beta (#876)
    โœ… 99d0689 - tests: explicitly close contexts for browser.newPage (#875)
    126eb50 - fix(transport): dispatch messages in separate tasks (#841)
    ๐Ÿ’ป 6202ff1 - browser(firefox): use guids for browser contexts, delete contexts on disconnect (#866)
    ๐ŸŒ a547aa7 - feat(connect): allow multiple webkit connections over web socket (#863)
    ๐Ÿšš f49d63f - test: remove fdescribe
    โœ… 5152540 - test(cookies): add more isolation tests (#869)
    โœ… a72784a - fix(test): properly clean input field (#860)
    fa6a5ed - chore: fix typo in aliases
    177a1d4 - chore: add "unit", "wunit" and "funit" aliases (#859)
    6318ba6 - feat(frame): introduce frame.frameElement (#856)
    โฌ†๏ธ 4be39f8 - chore(types): upgrade to typescript 3.7.5 (#855)
    ๐Ÿ“„ 4aa155e - docs(api.md): fix link
    cd68619 - chore: fix protocol-types-generator to work with new API
    55b6fe2 - feat(launch): introduce client, server & persistent launch modes (3) (#854)
    ๐Ÿ‘ท 28c4a16 - fix(): ensure we resume service worker before detaching from it (#850)
    โœ… a4c40ff - test: make sure page.fill actually clears an input (#851)
    ๐Ÿ‘• 1b1ed08 - browser(webkit): introduce DOM.scrollIntoViewIfNeeded (#847)
    ๐Ÿ‘• 0cc26c0 - browser(firefox): introduce Page.scrollIntoViewIfNeeded (#848)
    a2ab645 - feat(launch): introduce client, server & persistent launch modes (2) (#840)
    ๐Ÿš€ 0f1a42a - docs(readme): fix API link to always point to last released API
    ๐Ÿง f114255 - devops: attempt to fix linux bot
    โœ… 2e0f3e3 - docs: split docs to npm version and latest (#846)
    0518625 - feat(launch): introduce client, server & persistent launch modes (1) (#838)
    bdf8e39 - feat(goto): assume http:// for localhost navigations (#825)
    ๐Ÿ‘ท 8f1df5e - fix(): pause workers on start to not miss any events (#832)
    โœ… 4b761f4 - test: expect current behavior for cross-frame js handles (#833)
    6dc88bc - feat(webkit): roll WebKit to r1134 (#835)
    0c2a2e1 - fix: properly nullify error stacks (#836)
    e3e2da3 - feat(check): introduce page.check/uncheck (#826)
    ๐Ÿ“„ 2ba5e84 - docs: we are Playwright, not PlayWright
    ๐Ÿ“„ 3ef2313 - docs: fix dead link for element handle (#827)
    ๐Ÿšš 05d4746 - feat(selectors): temporarily remove zs engine (#824)
    1059e22 - fix(fill): make fill work for input[type=number] (#819)
    b82bc5f - feat: treat selectors with leading '(//' as xpath (#821)
    ๐Ÿ“ฆ cea036a - feat: change vendor package exports (#818)
    8028fb0 - feat(route): migrate from request interception w/ events to page.route (#809)
    ๐Ÿ’ป 84edefd - browser(webkit): follow up to Browser.setLanguage, fan out changes (#801)
    ๐Ÿ— 387b895 - browser(webkit): build more wk features (#807)
    ๐Ÿ‘ท 0a16b60 - browser(webkit): fix crash when a worker is terminated while logging (#797)
    0007439 - doc(api.md): Fix setPermissions link (#806)
    fce3842 - chore: bump version to 0.10.0-post (#796)