Releases: microsoft/playwright
v0.15.0
Browser Versions
- Chromium 84.0.4125.0
- Mozilla Firefox 76.0b5
- WebKit 13.0.4
New APIs
page.dispatchEvent(selector, type[, eventInit, options])
frame.dispatchEvent(selector, type[, eventInit, options])
elementHandle.dispatchEvent(type[, eventInit])
Bug Fixes
#1622 - [BUG] Example Dockerfile browser Dependencies
#1882 - [Feature] Support single quotes in text selector engine
#1936 - [BUG] Firefox cannot download Blobs
Raw notes
906d117 - chore: mark v0.15.0
5146dfc - chore: cut v0.15.0 (#1957)
9415dc2 - feat(chromium): roll Chromium to r762211 (#1956)
7c9762f - fix: support blob downloads (#1954)
21dc346 - devops: auto-correct links in our documentation (#1955)
6296614 - test: mark test as flaky on FFOX
5ac7f0e - fix(text selector): allow single quoted text (#1952)
e6c2cad - browser(webkit): add frame id to download info (#1953)
d354e9c - docs(contributing): clean up headings
c1c0237 - api(dispatchEvent): page, frame and handle versions added (#1932)
671cfa0 - fix(types): support objects with typed keys and values (#1752)
793586e - fix(click): throw instead of timing out when the element has moved (#1942)
f11113f - feat(firefox): roll to 1085 (#1951)
fd17cfb - docs(contributing): add info about skip and fail (#1944)
05f0797 - browser(firefox): support blob downloads (#1945)
2637805 - feat(webkit): roll to 1208 (#1948)
97a1aa5 - docs: update version table
40bed0f - docs: fix typos (#1947)
dc23c56 - tests(downloads): add a test for Blob downloads (#1936) (#1939)
471ccc7 - browser(webkit): roll to ToT 4/23/2020 (#1943)
2fcc2b5 - chore(chromium): resize browser frame when emulating viewport (#1924)
fa59372 - browser(webkit): roll to ToT 4/22/2020 (#1940)
51ed5c5 - fix(examples): closes #1916 (#1934)
b516ac4 - fix: Dockerfile for Firefox (#1937)
bf7430f - docs(readme): remove FAQ link
0b7f789 - devops: try using another Github Actions event to trigger releases (#1931)
70d727d - browser(webkit): ensure autorelease pools are drained on mac (#1933)
v0.14.0
Browser Versions
- Chromium 84.0.4117.0
- Mozilla Firefox 76.0b5
- WebKit 13.0.4
Highlights
- Common areas such as working with elements, filling a form and many more are now covered in the documentation section.
- Built-in
css
andtext
selectors now pierce open shadow roots. page.press(selector, key[, options])
now supports shortcuts such asControl+Shift+T
.- Many input actions like
page.click(selector[, options])
now automatically retry when the target element has been detached, for example if it was replaced at the end of an animation. - Playwright now provides API for capturing logs, see the
Logger
class.
Breaking API Changes
dumpio
parameter is gone. Debug logging is now configured via the environment:
DEBUG=pw:browser* node test.js
There are more loggers, use pw:*
to pick the ones you like.
For more complex scenarios you can use the logger
sink in the launch / create context apis.
page.on('filechooser')
event now dispatches instances of aFileChooser
class.- Actions that automatically wait for the navigation like
page.click(selector[, options])
no longer have an optionwaitUntil
to specify a load state. In the rare cases when this is needed, consider usingpage.waitForLoadState([state[, options]])
method. networkidle2
option is removed.networkidle0
is an alias tonetworkidle
.
New API
class: FileChooser
class: Logger
browserContext.unroute(url[, handler])
page.on('crash')
page.setInputFiles(selector, files[, options])
page.unroute(url[, handler])
elementHandle.getAttribute(name)
elementHandle.innerHTML()
elementHandle.innerText()
elementHandle.selectText()
elementHandle.textContent()
Bug Fixes
#1240 - [BUG] Click misbehaviour for Chromium in visible area
#1731 - [BUG] Installation of playwright is successful even if fetching browser binaries fails
#1735 - [REGRESSION]: Unclear error message when undefined is passed to page.click()
#1762 - [BUG] When clicking on a link navigating away from the website, playwright throws a removeFrameSession failure
#1798 - [BUG] npm says ""Unable to find a readme for [email protected]"
Raw Notes
cf1fd79 - chore: mark v0.14.0 (#1918)
9bd55e9 - docs(readme.md): drop FAQ (#1930)
e318ee5 - docs(readme): fix chromium version
a147d3f - chore: sync versions across packages (#1929)
511883d - devops: fix checking if branch is tip-of-tree when publishing @next (#1926)
53c78a8 - fix(downloads): fix acceptDownloads
complaint (#1777) (#1923)
00e8d88 - fix: do not auto wait for downloads (#1921)
fa6f738 - feat(browser): roll webkit to r1205 (#1922)
b7afbf8 - fix(webkit): ignore WebSocket certificate errors on Mac (#1900)
91c0631 - browser(webkit): extract webkit embedders into webkit/src (#1919)
6ecac8c - chore: restore networkidle0 alias (#1920)
95b8f61 - test: add more download tests (#1917)
136173a - chore: cut v0.14.0 (#1913)
f8f3b88 - docs(verification.md): fix typo
2926d33 - test: disable flaky firefox tests (#1912)
89007c8 - devops: make README.md to always reflect tip-of-tree (#1911)
2313ceb - browser(webkit): fix leaking popup windows (#1908)
c474c54 - devops: run CI against release branches too (#1910)
48cbee1 - browser(firefox): disable the extension blocklist (#1909)
0815ff3 - docs(browsers.md): fix nit
fa18c41 - docs(browsers.md): updates and nits
1865058 - docs(browsers.md): updates and nits
2d68830 - feat(testrunner): support --file
to filter tests by test file name. (#1903)
89b2fe5 - feat: introduce PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD
env variable (#1892)
0935144 - docs(browsers): add documentation describing managing browsers (#1907)
88366f3 - docs: adds introduction.md (#1905)
0f338ec - devops: introduce release publishing workflow (#1894)
e9914cc - docs: fix formatting
18fb7f9 - browser(webkit): ignore WebSocket HTTPS errors on Mac (#1899)
74ce041 - browser(webkit): roll to ToT 4/20/2020 (#1898)
96331de - devops: start actually publishing @next versions for tip-of-tree commits (#1893)
5b085fd - feat(logger): introduce context-level logger (#1896)
2320d9c - feat(webkit): roll to r1201 (#1897)
5d98631 - test: add a test for non-navigation downloads (#1895)
47c3841 - chore: bring back DEBUG= logging (#1891)
068e1e0 - devops: fix next version generation
ac8a30c - devops: start releasing from Github Actions (#1890)
80a7fcd - docs(verification): nits and typos
948d51d - fix(types): export selected types (#1881)
1935824 - devops: add package-lock.json (#1859) (#1889)
c2fe55e - docs: add verification guide (#1885)
37ad552 - browser(webkit): allow windows larger than display on Win (#1888)
0656771 - api(networkidle): remove networkidle2 (#1883)
1dff8e8 - chore: bump minimist dependency (#1866)
8ca120f - fix(tests): fix DEBUGP when running in parallel (#1886)
fb45c75 - feat(webkit): simulate device orientation events (#1852)
93c9083 - tests(firefox): unskip "should report shiftKey" on Linux&Win (#1833)
3485ffb - fix(docs): fix snippets, integrate navigations to ToC and core concepts (#1884)
d1a9551 - chore: remove old TODOs, add a test (#1879)
a000335 - test: add a test for sourceURL in exception stacks (#1880)
649f37f - fix(pageerror): report correct error message and stack (#1862)
4d8c057 - docs(selectors&ci): brush up respective sections
621df5d - docs: fix cross references (#1877)
ed89c37 - docs: fix API references
5406b77 - docs: add a note about string quoting
effeaaf - fix(click): force any hover effects before waiting for hit target (#1869)
6231d50 - docs(core-concepts): follow up on object handles
39b37be - docs(core-concepts.md): add section regarding object & element handles (#1871)
26c7b30 - browser(webkit): bump version to kick off next build on bot (#1875)
c0ce6c7 - browser(webkit): fix win compilation (#1874)
1f43ae6 - feat(logging): introduce logger sink api (#1861)
b825983 - devops: disable previews on telegram bot messages
e0d3e48 - devops: use node.js to gzip logs
ea95a91 - devops: start uploading build logs to bots (#1870)
ef7815e - doc(network): reorder items in network docs
f6fec27 - docs(core-concepts): add selectors and auto-wait sections
92a4c70 - docs(input): include clicks and files sections (#1868)
92b6bc0 - Revert "devops: add package-lock.json (#1859)"
75f35e4 - devops: add package-lock.json (#1859)
c359116 - fix: create _defaultContext only in persistent mode (#1854)
022bc67 - chore(chromium): allow passing --remote-debugging-port for debugging (#1857)
55b4bc9 - feat(actions): requery the element when it was detached during the action (#1853)
e466508 - browser(webkit): fix mac&win compilation (#1856)
cf82e2c - fix(testrunner): await terminations before reporting test results (#1855)
1912fbf - browser(webkit): simulate device orientation events (#1851)
cf415bb - test: add failing popup tests (#1849)
39c9a45 - feat(firefox): roll to r1084 (#1850)
2a866d6 - test(network): rebaseline request failed test on win
2b96b85 - fix(firefox): throw error when added script blocked by CSP (#1841)
e8bf5fd - Update pngjs and jpeg-js dependencies (#1845)
a248430 - reapply api(waitUntil): remove waitUntil options from the actions (#1842)
3151ea2 - test: disable flaky fixtures test (#1839)
31460b1 - Revert "api(waitUntil): remove waitUntil options from the actions (#1834)" (#1840)
846af74 - browser(firefox): do not use system colors for controls (#1838)
51b8685 - feat(testrunner): support --repeat
CLI flag to repeat tests (#1828)
d0b8710 - api(waitUntil): remove waitUntil options from the actions (#1834)
af2340c - fix(click): explicitly fail when element detached during click (#1835)
629b772 - docs(loading): nits and fixes
04ed683 - tests(firefox): unskip network idle tests (#1832)
e67603d - docs(emulation): review, fix nits
42eefa6 - docs: emulation guide (#1831)
55c01da - fix(firefox): fire "requestfailed" event on network errors (#1817)
f594229 - feat(api): wait for popups and downloads when performing actions (#1744)
67cd569 - docs: typo fix
036f9e5 - fix(webkit): allow fufilling requests to redirects (#1830)
5ec2c58 - t...
v0.13.0
Current Status
- Chromium 83.0.4101.0. Tests: 983 passing, 7 failing.
- Webkit 13.0.4. Tests: 916 passing, 6 failing.
- Firefox 75.0b8. Tests: 908 passing, 13 failing.
Detailed status can be found at IsPlaywrightReady?
Highlights
- New downloads API to track downloads
- Playwright now ships new typescript types with better support for evaluates, events, and many other parts of the API
- Out-of-process iframes are now supported in chromium! 🎉(more info: puppeteer/puppeteer#2548 and https://bugs.chromium.org/p/chromium/issues/detail?id=746266)
- Running Playwright on Github Actions is easy now with playwright-github-action
New API
- new
Downloads
class - new
colorScheme
option in abrowser.newContext()
method - new
acceptDownloads
option in abrowser.newContext()
method - new
contentScript
option in aselectors.register()
method - new
waitUntil
andtimeout
options inelementHandle.setInputFiles
method
Bug Fixes
#1316 - Allow custom selector engines to run in the main world
#1427 - [Feature] text=
selector to match
#1440 - [Feature] Warning, instead of error, on devtools: true
#1442 - [BUG] Fill throws "Element is not visible" despite waiting for visibility
#1510 - [BUG] extract-zip
fails npm audit
#1518 - [BUG] establish a bot to validate install flow
#1535 - [BUG][0.12.1] Unable to install on mac10.13
#1553 - [BUG] OOPIFs cannot read property 'xxx' of undefined for iframes in non-headless mode
#1589 - [Question] Could you please update the link to e2e Boilerplates ?
#1592 - [Question] $eval vs getProperties
#1613 - [BUG] Documentation regarding video playback in Playwright
#1651 - [BUG] PLAYWRIGHT_BROWSERS_PATH throws error on subsequent installs
#1674 - [Feature] Overload waitForEvent to return specific type
Raw Notes
17e645a - chore: mark version v0.13.0 (#1720)
3a1ffea - fix(types): add types for waitForEvent (#1715)
2fd7f4e - devops: fix update_version.js script
2d57fff - fix(tests): fix multiple browsers tests (#1718)
6723254 - docs: remove stale file (#1719)
d5a746a - chore(ci): use playwright github action (#1712)
ade9d23 - test: remove module.export.describe wrapper (#1716)
2ef8e26 - test: structure tests to use environments, closer to end user (#1713)
be06bb0 - test: mark headful test as slow (#1710)
22a7636 - browser(webkit): always open local Web Inspector on "Inspect element" (#1711)
4d4e856 - browser(webkit): open inspector undocked by default (#1706)
5b4d32d - fix(chromium): fix a race in persistent context launch (#1702)
685f14d - feat(firefox): update to 1075 (#1705)
aff2ffa - browser(firefox): manage network activity per page (#1700)
20ff327 - feat(testrunner): catch delegate errors (#1704)
0ff2e6a - test: move api coverage to a spec file (#1703)
af01d15 - test: slim down test utils (#1701)
d21e2c9 - docs(api.md): clarify downloads lifetime (#1698)
118333a - test: fix event coverage on Chromium (#1693)
222d01c - devops(docker): Install ffmpeg dependency, adding codecs necessary for video playback in Firefox (#1627)
39e06f0 - feat(testrunner): improve reporting of unhandled errors/rejections (#1697)
a7ae205 - feat(firefox): support downloads (#1689)
949dc7b - chore: bump extract-zip dependency (#1696)
c6f580f - chore: migrate from timeouts to deadlines internally (#1695)
362b72c - docs(docker): fix tag in docker run command (#1694)
e683c08 - fix(fill): make fill work with date/time inputs (#1676)
e0c8fbf - test: put test runner api on global, remove unused parameters (#1684)
e15fc08 - chore: migrate node types to 10.17.17 (#1690)
becf97f - browser(firefox): report navigation request failure for downloads (#1688)
4cf5cf6 - docs(api.md): fix link to download class
7b2736b - browser(firefox): support downloads (#1683)
889cf8f - fix(input): climb dom for pointer-events:none targets (#1666)
3dc14ed - fix(colorScheme): make light scheme default on all browsers (#1668)
cd39053 - feat(testrunner): make it easier to setup golden matcher (#1682)
e519a3d - fix(testrunner): better capture Location for hooks (#1680)
f2b13c0 - chore(testrunner): split TestRunner into parts (#1679)
aeeac55 - feat(chromium): support oopifs (#1664)
56fbfc2 - fix(firefox): do not make stray network requests (#1673)
11ad172 - browser(firefox): allow setting colorScheme on the context level (#1672)
5673fd7 - feat(firefox): bump to 1071 (#1670)
2eba79b - fix: permissions in mobile and geolocation example (#1667)
65ca87c - fix: fix PLAYWRIGHT_BROWSERS_PATH treatment (#1662)
17039f1 - fix(webkit): fix non-mac screenshots w/ dsf (#1665)
a91304a - feat(selectors): attribute selectors pierce open shadow roots (#1656)
e9428b6 - devops: fixate diff algorithm to not rely on dev settings (#1663)
3c01bf6 - browser(webkit): account for non-Mac device scale factor (#1661)
b7d0c32 - fix(browser): wait for the pipe to disconnect in browser.close (#1652)
b89df07 - test: add device scale factor screenshot tests (#1660)
823f961 - feat(testrunner): migrate from events to a delegate (#1647)
f216ab9 - chore(chromium): small improvement with updating touch (#1659)
fc73d54 - browser(firefox): instrument all browser windows early enough (#1645)
270206e - feat(text selector): match button input by value (#1657)
f8ecdff - fix: typo in input.ts (#1653)
bebce8f - feat(webkit): bump version to 1187 (#1646)
1f2803b - feat(testrunner): removeEnvironment (#1650)
ea16e55 - fix(lint): import errors (#1649)
a9be3c5 - feat(text selector): pierce shadow roots (#1619)
75571e8 - feat(downloads): support downloads on cr and wk (#1632)
3d6d9db - fix: wait for the process to close when closing the browser (#1629)
b1580a3 - browser(webkit): roll to r259389 (#1643)
d38baae - feat(testrunner): nested environments (#1635)
f3f10ae - browser(webkit): support downloads on windows (#1642)
692f4db - devops(ci): added job for testing package installations (#1572)
a1f22aa - chore: upgrade typescript to 3.8.3 (#1641)
2ac6967 - docs(api.md): remove dead link to FAQ section (#1640)
7c2ddc2 - feat(firefox): support timezone override (#1578)
e76f8de - browser(firefox): reland "instrument all windows, support silent mode" with Linux fix (#1634)
c345cfe - test: disable one flaky test on Chromium (#1633)
14dbf4a - chore(tests): meaningful split between test.js and playwright.spec.js (#1630)
9d04dcc - docs(examples): working with selectors (#1624)
e241c1b - chore: remove web mode (#1625)
cf49a9e - browser(firefox): make timezone override work on Win (#1628)
1f0b7bf - docs(api): update ordering for
c218d8c - fix(firefox): isolate ignoreHTTPSErrors setting between contexts (#1617)
c2617c0 - Update README.md
f87e645 - feat(testrunner): introduce environments (#1593)
a7b61a0 - fix(text selector): by default, do a substring match (#1618)
1da2141 - browser(firefox): delete Browser.setIgnoreHTTPSErrors (#1616)
4ac98da - browser(firefox): set ignoreHTTPSErrors per context (#1614)
2ce85f9 - Revert "browser(firefox): instrument all windows, support silent mode… (#1615)
6053784 - feat: add missing slowMo to launchPersistentContext (#1597)
a853690 - fix(types): don't export derived types (#1598)
9e85f8d - chore(waitForEvent): refactor waitForEvent into a single implementation (#1602)
314eb40 - browser(firefox): instrument all windows, support silent mode (#1612)
34610f2 - chore(tests): use public types for the tests (#1600)
2402aad - docs(api): elaborate on fill vs type (#1608)
dd4fe90 - feat(webkit): roll WebKit to r1185 (#1611)
d0073ef - chore(firefox): update cheatsheet with logging instructions (#1609)
307b33a - feat(chromium): roll to r754895 (#1610)
92c5ab3 - fix(types): correctly infer type in
08aebc7 - fix(types): add types for waitForEvent (#1601)
13a6c89 - fix(test): actually test if page.waitFor accepts arguments (#1599)
a2e1d4c - browser(webkit): implement support for downloads (#1596)
950d427 - fix: catch websocket error events (#1595)
eabba56 - docs(api.md): clarify jshandle.getProperties()
method (#1594)
43b91e6 - browser(firefox): implelemt timezone overrides (#1577)
d130479 - feat(webkit): roll webkit to 1184 (#1570)
fdc3612 - browser(firefox): refactor targets/contexts/dispatching (#1590)
1f08b72 - test: add web socket leak test coverage (#1586)
31f186c - fix(browserFetcher): support macos 10.13 for firefox and chromium (#1549)
d9c064b - docs(showcases): fixed dead link to e2e boilerplates (#1591)
a007cae - Fixed small typos (#1588)
b6166c9 - chore(testrunner): introduce Location class (#1585)
c49b856 - chore(testrunner): remove setup() helper (#1584)
a41836b - chore(testrunner): introduce TestRun (#1582)
5499b18 - feat(websocket): wrap firefox web socket too (#1580)
b85ab89 - chore(testrunner): make most modifiers external (#1581)
4bd46ba - feat(testurnner): allow multiple hooks isntances and per-test hooks (#1571)
6503c83 - fix(install): speculative fix for generateChromiumProtocol (#1583)
f72b6b4 - test: try to unflake fixtures tests (#1574)
b4a2014 - test: add failing FF test around ignore https (#1576)
6903496 - fix(build): generate protocol in chromium (#1579)
a042466 - chore(testrunner): remove effe...
v0.12.1
Current Status
- Chromium 83.0.4090.0. Tests: 972 passing, 4 failing.
- Webkit 13.0.4. Tests: 905 passing, 6 failing.
- Firefox 74.0b10. Tests: 873 passing, 36 failing.
Detailed status can be found at IsPlaywrightReady?
Bug Fixes
#1513 - [REGRESSION] npm install [email protected]
Raw notes:
a7ca2fe - chore: mark version v0.12.1 (#1515)
ed746d9 - fix: fix all packages installation (#1514)
1084008 - chore: update release guide
a4dca79 - chore: update release guide
ed6e0d5 - chore: bump version to v0.12.0-post (#1512)
v0.12.0
Current Status
- Chromium 83.0.4090.0. Tests: 972 passing, 4 failing.
- Webkit 13.0.4. Tests: 905 passing, 6 failing.
- Firefox 74.0b10. Tests: 873 passing, 36 failing.
Detailed status can be found at IsPlaywrightReady?
Highlights
-
There is no extra window when launching in headful mode.
-
Default viewport has been changed from 800x600 to 1280x720.
-
Published recipes for popular CI environments.
-
Playwright now includes a carefully crafted
index.d.ts
file with documentation inlined from api.md. Any type-related issues are welcome. -
Many APIs are now available on browser context, for example
browserContext.route(url, handler)
. This makes it easier to setup context once and ensure that all pages and popups behave consistently. -
Many actions (for example,
page.click(selector[, options])
orpage.evaluate(pageFunction[, arg])
) by default wait before and after performing an action to facilitate linear workflow.- Before action: input actions like
click
orfill
wait for the element to be present in the dom, displayed, stop moving and receive pointer events. This behavior can be disabled by passing{force: true}
option. - After action: many actions wait for any triggered navigations to finish. Option
waitUntil
determines the "navigation finished" condition, for exampleload
ordomcontentloaded
.
This change eliminates the need for explicit waits:
// Waits for the link to be present and clickable, // clicks it and waits for the navigation to finish. await page.click('a'); // Ready to use. console.log(await page.title());
Previously, it was necessary to wait for preconditions and postconditions to avoid flakiness:
// Waits for the link to be present. // Not needed anymore. await page.waitForSelector('a'); await Promise.all([ // Waits for the triggered navigation to finish. // Not needed anymore. page.waitForNavigation(), // Clicks the link. page.click('a'), ]); // Ready to use. console.log(await page.title());
- Before action: input actions like
-
Evaluation functions (for example,
page.evaluate(pageFunction[, arg])
) now accept nested handles inside objects/arrays, but only take a single argument.const x = await page.evaluateHandle(() => window.scrollX); const y = await page.evaluateHandle(() => window.scrollY); // Old style, does not work anymore: await page.evaluate((x, y) => x + y, x, y); // New style, passing an object: await page.evaluate(({x, y}) => x + y, {x, y}); // New style, passing an array: await page.evaluate(([x, y]) => x + y, [x, y]); // New style, passing arbitrary object structure with handles inside: await page.evaluate(({ scrollOffset }) => scrollOffset.x + scrollOffset.y, { scrollOffset: { x, y }});
Breaking API Changes
-
BrowserContext
browserContext.setCookies()
is renamed tobrowserContext.addCookies(cookies)
.browserContext.setPermissions()
is renamed tobrowserContext.grantPermissions(permissions[, options])
and grants additional permissions instead of overriding entire permissions list.
-
BrowserType
browserType.devices
is removed.browserType.downloadBrowserIfNeeded()
is removed.browserType.errors
is removed.browserType.launchPersistent()
is renamed tobrowserType.launchPersistentContext(userDataDir[, options])
.
-
ChromiumTarget
ChromiumTarget
, related events and methods are removed. UsebrowserContext.on('page')
,chromiumBrowserContext.on('backgroundpage')
andchromiumBrowserContext.on('serviceworker')
.chromiumTarget.createCDPSession
is moved tochromiumBrowserContext.newCDPSession(page)
.
-
ElementHandle
elementHandle.click({relativePoint})
-relativePoint
is renamed toposition
.elementHandle.click({clickCount})
-clickCount
now clicks multiple times, instead of producing a single event with aclickCount
property.elementHandle.select()
is renamed toelementHandle.selectOption(values[, options])
.elementHandle.tripleclick()
is removed.elementHandle.visibleRatio()
is removed.
-
Frame
frame.click(selector, {relativePoint})
-relativePoint
is renamed toposition
.frame.click(selector, {clickCount})
-clickCount
now clicks multiple times, instead of producing a single event with aclickCount
property.frame.select()
is renamed toframe.selectOption(selector, values[, options])
.frame.tripleclick()
is removed.frame.waitForLoadState([state[, options]])
now takes a separatestate
parameter.
-
Keyboard
keyboard.sendCharacters()
is renamed tokeyboard.insertText(text)
.
-
Page
page.on('workercreated')
is renamed topage.on('worker')
.page.on('workerdestroyed')
is moved toworker.on('close')
.page.click(selector, {relativePoint})
-relativePoint
is renamed toposition
.page.click(selector, {clickCount})
-clickCount
now clicks multiple times, instead of producing a single event with aclickCount
property.page.evaluateOnNewDocument()
is renamed topage.addInitScript(script[, arg])
.page.route(url, handler)
handler function now accepts two parameters:Route
andRequest
. Routing methodsabort
,continue
andfulfill
are only available on theRoute
class.page.select()
is renamed topage.selectOption(selector, values[, options])
.page.tripleclick()
is removed.page.waitForLoadState([state[, options]])
now takes a separatestate
parameter.
-
Request
request.redirectChain()
is replaced withrequest.redirectedFrom()
andrequest.redirectedTo()
.
-
Response
response.buffer()
is renamed toresponse.body()
.
-
Selectors
selectors.register(name, script)
now requires aname
parameter.
New APIs
- BrowserContext
browserContext.setExtraHTTPHeaders(headers)
allows to specify additional HTTP headers to be sent with every request in every page in the browser context.browserContext.setHTTPCredentials(httpCredentials)
allows to handle HTTP authentication.- [
browserContext.addInitScript(script[, arg])
](https://github.com/microsoft/playwrig...
v0.11.1
Current Status
- 82.0.4057.0. Passes 99% (793/803) tests
- Webkit 13.0.4. Passes 99% (793/803) tests
- Firefox 73.0b13. Passes 95% (764/803) tests
Detailed status can be found at IsPlayWrightReady?
Bug Fixes
#1009 - [REGRESSION] Firefox keyboard doesn't type any more
#1016 - [REGRESSION]: webkit tests fails on travis
Raw Notes
2037e01 - chore: mark v0.11.1 (#1025)
b1520f7 - feat(webkit): roll webkit to r1151 (#1021)
9caa61a - devops: upload logs for test runs (#1015)
3656403 - fix(keyboard): Add mac editing commands for NumpadEnter (#1026)
21acb36 - fix(keyboard): correctly press enter on firefox (#1023)
df8de20 - browser(webkit): do not leak contexts on windows (#1020)
5695ade - test: add failing test for Firefox (#1019)
bb8d435 - chore(docs): add community showcase (#1018)
bd139e4 - chore(travis): install libvpx on travis for webkit (#1017)
8487ef2 - feat(testrunner): add DEBUG to testrunner (#1014)
2e9e0b7 - devops: rename bots to feature browser first
dbb45d4 - Revert "feat(click): waitForInteractable option, defaults to true (#934)" (#1013)
9413351 - feat(click): waitForInteractable option, defaults to true (#934)
39c580a - chore: bump version to 0.11.0-post (#1001)
v0.11.0
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 withbrowser.newContext
to obtain a clean environment. All new contexts are ephemeral, not persisted into the profile directory. It no longer acceptsuserDataDir
option. There is no notion of thedefaultContext
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.) -
browserType.launchPersistent
- default mode for headful operations and those reusing the user profile. Instead of returning theBrowser
, it returns theBrowserContext
loaded from the user data dir right away. It requiresuserDataDir
to be passed as the first parameter. -
browserType.launchServer
- returns aBrowserServer
(formerly known asBrowserApp
) that can be connected to via thebrowserType.connect
. Multiple clients can connect to the same server. Closing theBrowser
disconnects from the server. This mode is useful for certain test runner setups.
-
-
Request interception
page.setRequestInterception
is replaced with thepage.route
. New method accepts the pattern of the urls to be intercepted and handles interception in place, instead of using thepage.on('request')
event. Note that we intend to move this method into theBrowserContext
over time to make sure it affects popup windows. -
Viewport
-
page.setViewport
is renamed topage.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 topage.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()
andpage.uncheck()
- toggle your checkboxes. -
new
browserContext.on('close')
event - tells when the context is destroyed (disconnected from the server). -
new
browserType.downloadBrowserIfNeeded()
- when you useplaywright-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 thepage.setRequestInterception
api. -
new
page.viewportSize()
- used instead ofpage.viewport
.
In addition to this, all playwright packages now expose the same API and are only different in
the set of browsers they download:
playwright
- downloads all 3 browsers (chromium, webkit & firefox)playwright-core
- does not download any browsers. Handy together withbrowserType.downloadBrowserIfNeeded()
playwright-chromium
- downloads only chromiumplaywright-firefox
- downloads only firefoxplaywright-webkit
- downloads only webkit
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)
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)
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)
c69...
v0.10.0
Current Status
- Chromium 81.0.4044.0. Passes 99% (837/845) tests
- Webkit 13.0.4. Passes 98% (746/758) tests
- Firefox 73.0b3. Passes 94% (726/776) tests
Detailed status can be found at IsPlayWrightReady?
Bug Fixes
#560 - Default profile for does not save data into specified folder
#565 - WebKit build flags
#583 - troubleshooting.md is missing
#606 - Missing a few device defs for landscape variants
#627 - Types exported from playwright-core, but not playwright
#658 - Strip the browser binaries
#661 - Typo in docs: dedault
#668 - request.continue() override with post data
#669 - Error 404 minibrowser-mac-10.13.zip
#696 - [email protected] types will not build
#705 - Firefox's WebSocket has no unguessable token suffix
#764 - File upload doesn't work
#783 - [Feature] Expose page.target()
Raw Notes
25f2a32 - feat: add Page.opener() to the API (#790)
1489fbd - fix: do not recommend yarn (#794)
b8199c0 - chore(webkit): use async/await to make eval more readable (#789)
0f305e0 - test(cookies): Rename clearCookies describe (#791)
84c93d2 - browser(webkit): plumb stderr from the web process to the main process (#792)
ef1d2fb - Revert "fix: move offline/cache/interception switches to BrowserContext (#748)" (#793)
9438136 - browser(webkit): enable some build features on win (#788)
4904459 - browser(webkit): introduce Browser.setLanguage (#781)
c57fd22 - fix(webkit): unflake Page.setContent (#786)
2bf88fd - test: start adding capability smoke tests (#784)
5cb19c6 - test: extract common headful tests (#785)
9a00e1d - docs: update webkit.md features
d054490 - docs: update readme
1f8e6e6 - doc: update readme
1c7db46 - doc: update readme
8a40fd0 - docs: update the readme intro sentence
76c22b7 - docs: bump Chromium version (#778)
adc5e3b - browser(webkit): bump WebKit to r1128 to check binary stripping
b77b31c - devops: strip linux binaries
24c5df6 - docs: add webkit build flags table (#777)
e33e403 - chore: nits to issues template
293fc6f - chore: remove bad issue templates
902580b - chore: update issues template
b289bb7 - fix(filechooser): intercept file choosers lazily (#776)
985faeb - fix: avoid unhandled promise rejection in WKSession.send (#770)
fd3a930 - fix(webkit): roll webkit to 1127 (#775)
735c5e6 - browser(webkit): fix compilation on Mac (#774)
e131fe0 - fix(chromium): install libgbm (#773)
83b5d89 - fix(firefox): roll firefox to 1021 (#769)
adc91c9 - chore(docs): fix broken link for downloaded browsers (#772)
ca49d50 - test: disable firefox popup tests that rely on waitForLoadState (#768)
1344596 - feat(chromium): roll to r737027 (#771)
6c58f93 - browser(webkit): simplify isolated world handling (#766)
2b231c9 - fix(test): unflake waitForSelector when browser closes test (#767)
1ad6134 - browser(webkit): ensure user worlds created when attaching to new pages (#765)
f4640d1 - Revert "tests(accessibility): Remove unused browser goldens (#758)" (#763)
d590ab9 - tests(accessibility): Remove unused browser goldens (#758)
1b012e5 - fix: do actually catch worker initialization exceptions (#762)
603b9f5 - fix: make contentFrame cross-frame handles test pass (#761)
eb56804 - test: unflake owner frame test (#760)
c9544b9 - docs: add documentation for selector engines (#752)
f44d660 - feat(webkit): use consistent user agent for headful and headless (#756)
ce72198 - feat(webkit): roll webkit to 1124 (#736)
44829d6 - browser(firefox): wait for pending accessibility updates (#755)
bcc920c - browser(webkit): follow-up to update inspector file locations (#754)
0e6b44d - feat(selectors): selectors.register accepts function (#753)
87abfe0 - browser(webkit): roll to WebKit ToT 1/29/2020 (#737)
afc0222 - browser(webkit): do not crash when opening inspector on mac (#751)
6faf74b - fix: move offline/cache/interception switches to BrowserContext (#748)
9a126da - feat: lower the engine requirement to node 10.15.0 (#750)
7ea4110 - browser(webkit): expose worker's owner frame (#694)
e64fd17 - devops: fix firefox building script on Mac 10.15.1
fc93b88 - fix: typo (#740)
a65bf41 - test(browsercontext): cookies() is a BrowserContext function (#741)
492304b - feat(firefox): roll firefox to r1020 (#735)
b68a88a - test: enable passing modifiers test (#733)
ce7c8d7 - feat: introduce BrowserType.name() (#732)
184b25f - chore: windows bots via github actions (#678)
4a3bd60 - fix(test): fix race in confusing confuse with previous navigation
test (#730)
89a9311 - chore(webkit): bump webkit revision to 1120 (#727)
5e5d193 - test: don't ignore random arguments (#726)
4c25180 - chore(webkit): do not call setPauseOnStart for each target (#725)
4b0ce1d - browser(webkit-wpe): do not preload about:blank into popups (#724)
09e97af - feat(wk,ff): amend method & postData upon continue (#703)
c35c65b - docs(api.md) Rename page to context in newContext (#723)
75f7ff3 - docs(api.md) Fix USKeyboardLayout link (#719)
7af1d12 - browser(firefox): use unguessable web socket address (#722)
460527d - fix(webkit): do not poll readyState if target is paused before first navigation (#721)
9d34f28 - docs(api.md) Rename page to context in newContext (#718)
62f4ed6 - feat(unit): add click test on animated target (#655)
c04ad14 - feat(launcher): gracefully close browser on sigint (#650)
3248749 - fix(webkit): make frames detect their initial load state (#690)
19da86b - browser(firefox): amend method & postData upon continue (#716)
38b5f76 - fix(test): wait for load state before checking opener of popup (#714)
2bef4ae - feat(api): introduce selectors.register method (#701)
9cd6157 - devops: add auto-rebase github action
2ddc987 - fix(webkit): initialize popups on start (#693)
a64fc0e - chore: fix missing device definitions (#708)
9554ef4 - docs: make individual FAQ items linkable (#712)
90d84e8 - docs(api): fix cdp session creation example (#709)
ff30235 - chore: fix package typo in packages README (#707)
53cdbc5 - docs: clarify relationship to Puppeteer (#711)
45e88f7 - browser(webkit): amend method & postData upon continue (#702)
023fa01 - fix: playwright-core types (#699)
e276430 - doc: require webSocket:true for endpoint availability (#706)
79ea30c - docs: sort classes by use (#700)
bd726ee - chore: bump version to v0.9.24-post
3e40b4e - chore: mark version 0.9.24
54f442e - fix: properly expose top-level devices (#698)
e9515f4 - browser(webkit): pause popups on start (#691)
89b5d2f - fix(setContent): manually reset lifecycyle for all browsers at the right moment (#679)
aa2ecde - browser(webkit): make popups functional in mac embedder (#689)
ee9c2b0 - chore: bump version to v0.9.23-post
03e2754 - chore: mark version 0.9.23
d7beaa7 - chore: bump version to 0.9.22-post (#684)
0a7005e - chore: mark version v0.9.22 (#682)
7128628 - feat(testrunner): ability to repeat test suites (#681)
541fa95 - fix(ownerFrame): correctly handle adopted node usecase (#677)
b3cd7a4 - browser(webkit): remove URL from TargetInfo (#676)
5a5016f - docs: inline superclass toc into classes for convenience (#663)
c850430 - docs(api.md): remove browser downloads section (#675)
6e4bf95 - fix(install): check macOS version to be 10.14 or higher (#671)
e65cc77 - fix(pw_run): Allow running from paths with spaces (#674)
1b8cfff - browser(webkit): fix GTK build (#673)
a779efe - browser(webkit): always dispose persistent context before exiting (#649)
9e0cf72 - docs(api.md): add missing docs (#664)
99414b0 - doc(page): Improve Page description (#665)
4b84973 - docs: api.md typos
7f46a09 - feat(webkit): roll to r1011 (#659)
d2bfe00 - browser(webkit): fix setOfflineMode (#656)
f03b648 - chore: removed build labels from readme
b4b7c5e - feat(webkit): enable user-data-dir tests for all platforms (#646)
63d5a73 - fix(types): export playwright-core types from playwright (#628)
5fdb3e2 - chore(webkit): roll to 1111 (#644)
2ae6466 - browser(webkit): support user-data-dir on win (#642)
b64604c - chore: replace pptr with pw (#643)
be19ae5 - feat(browserApp): kill and onclose (#641)
f1d1dfb - fix(webkit): rewrite global object retrieval errors (#640)
fb9ec96 - browser(webkit): support --user-data-dir on Linux (#610)
a4f27c1 - browser(webkit): fix compilation on Mac 10.15 (#638)
c453851 - api: introduce BrowserType with a single interface, update top-level api (#636)
199d094 - fix: make launch options in ffPlaywright optional (#637)
834698c - docs(readme): update hero snippet to illustrate single API (#631)
3abaced - chore(webkit): build wpe and gtk to different folders (#616)
f463d06 - browser(webkit): fix WPE compilation (#635)
12a4354 - browser(webkit): roll to r255078 (#633)
2b44d75 - test: move most launcher tests to common (#621)
ff87701 - doc(troubleshooting): add note about lack of node 8 support (#623)
03f37bc - doc(readme): add test status badges (#617)
69c5b2a - docs: clarify Puppeteer active status (#619)
060fbf7 - fix(workers): emit workerdestroyed event when clearing workers (#618)
056fbbd - fix(api): make pipe connection the default, expose webSocket launch option (#562)
b4b81ba - chore: move downloads to Azure CDN (#615)
6b8c40e - browser(webkit): respect --user-data-dir on MacOS (#579)
3b2993f - fix(docs): add back troubleshooting.md (#605)
866c602 - fix(firefox): disable ICC color correction based on OS display (#614)
c1cca19 - test: extract tests for webkit provisional page (#609)
4cf2180 - fix(docs): add docs for the websocket event (#612)
b8e2bba - chore: run lint on travis (#613)
74e9859 - feat(firefox): roll to 1018 (#604)
044ebd7 - fix: delete contexts from the map on navigation (#602)
ac2ba3c - fix(api): BrowserServer -> BrowserApp, resuse it between browsers (#599)
b4209e9 - test: move user-data-dir tests into shared location (#603)
a5019ea - fix(api): remove remoteAddress from api (#601)
23a668e - feat(firefox): support request interception...