Pavel Feldman
2cdf297245
chore: remove uncompiled download-browser ( #2018 )
2020-04-28 17:06:01 -07:00
Dmitry Gozman
7f5d89009c
test(click): add a test for 'Element has moved' exception ( #2017 )
2020-04-28 11:58:22 -07:00
Pavel Feldman
d52bd92983
chore: read browser revisions off browsers.json ( #2009 )
2020-04-28 10:37:23 -07:00
Dmitry Gozman
f662686fcd
chore(css selector): temporarily remove light dom shortcut ( #2008 )
2020-04-27 20:23:31 -07:00
Dmitry Gozman
8aab725813
fix(css selector): properly parse quoted attributes when querying in shadow ( #2007 )
2020-04-27 19:50:11 -07:00
Dmitry Gozman
031587a9cf
fix(visibility): unify visibilty checks ( #1998 )
...
This applies a common definition of visibility to clicks and waitfors:
- non-empty bounding box - implies non-empty content and no display:none;
- no visibility:hidden.
2020-04-27 15:40:46 -07:00
Pavel Feldman
7f8aa703dd
api(waitFor): remove waitFor, use specialized wait functions ( #1995 )
2020-04-27 12:08:29 -07:00
Dmitry Gozman
f9f5fd03b0
feat(selectors): allow to capture intermediate result ( #1978 )
...
This introduces the `*name=body` syntax to capture intermediate result.
For example, `*css=section >> "Title"` will capture a section that contains "Title".
2020-04-27 10:14:09 -07:00
Dmitry Gozman
7ecf252dd6
feat(text selector): concat sibling text nodes when calculating text ( #1969 )
...
Text that is split into multiple text nodes now matches.
2020-04-24 20:49:29 -07:00
Pavel Feldman
b60c006c63
chore: simplify and restructure downloads ( #1974 )
2020-04-24 19:14:10 -07:00
Yury Semikhatsky
7c9762fae9
fix: support blob downloads ( #1954 )
2020-04-23 20:04:19 -07:00
Dmitry Gozman
5ac7f0e4ec
fix(text selector): allow single quoted text ( #1952 )
2020-04-23 18:48:53 -07:00
Pavel Feldman
c1c0237d4e
api(dispatchEvent): page, frame and handle versions added ( #1932 )
2020-04-23 14:58:37 -07:00
Joel Einbinder
671cfa0a54
fix(types): support objects with typed keys and values ( #1752 )
...
There are a few places in the API where we use objects as maps. This patch adds them to docs and the types.
For `env`, we accept booleans and numbers as well because they are often used for their string values.
2020-04-23 14:45:57 -07:00
Dmitry Gozman
793586e42c
fix(click): throw instead of timing out when the element has moved ( #1942 )
2020-04-23 14:44:06 -07:00
Pavel Feldman
2fcc2b5552
chore(chromium): resize browser frame when emulating viewport ( #1924 )
2020-04-23 10:38:58 -07:00
Ross Wollman
53c78a8a29
fix(downloads): fix acceptDownloads
complaint ( #1777 ) ( #1923 )
2020-04-22 17:02:15 -07:00
Yury Semikhatsky
00e8d88777
fix: do not auto wait for downloads ( #1921 )
2020-04-22 15:08:39 -07:00
Pavel Feldman
6ecac8c164
chore: restore networkidle0 alias ( #1920 )
2020-04-22 10:52:01 -07:00
Pavel Feldman
5b085fdf03
feat(logger): introduce context-level logger ( #1896 )
2020-04-20 23:24:53 -07:00
Pavel Feldman
47c384112c
chore: bring back DEBUG= logging ( #1891 )
2020-04-20 20:00:55 -07:00
Pavel Feldman
0656771167
api(networkidle): remove networkidle2 ( #1883 )
2020-04-20 16:52:26 -07:00
Yury Semikhatsky
fb45c75b98
feat(webkit): simulate device orientation events ( #1852 )
2020-04-20 14:43:44 -07:00
Dmitry Gozman
d1a95518be
chore: remove old TODOs, add a test ( #1879 )
2020-04-20 13:01:06 -07:00
Dmitry Gozman
649f37f885
fix(pageerror): report correct error message and stack ( #1862 )
...
The error stack matches the browser format.
2020-04-20 11:37:02 -07:00
Dmitry Gozman
effeaaf852
fix(click): force any hover effects before waiting for hit target ( #1869 )
...
This way, any on-hover animations or click blockers will be accounted for.
2020-04-20 10:07:59 -07:00
Pavel Feldman
1f43ae692f
feat(logging): introduce logger sink api ( #1861 )
2020-04-20 07:52:26 -07:00
Yury Semikhatsky
c359116a3b
fix: create _defaultContext only in persistent mode ( #1854 )
2020-04-18 19:58:11 -07:00
Pavel Feldman
022bc67c07
chore(chromium): allow passing --remote-debugging-port for debugging ( #1857 )
2020-04-18 19:06:42 -07:00
Dmitry Gozman
55b4bc99bd
feat(actions): requery the element when it was detached during the action ( #1853 )
2020-04-18 18:29:31 -07:00
Yury Semikhatsky
2b96b85e05
fix(firefox): throw error when added script blocked by CSP ( #1841 )
2020-04-17 08:51:54 -07:00
Pavel Feldman
a248430af8
reapply api(waitUntil): remove waitUntil options from the actions ( #1842 )
2020-04-16 20:31:04 -07:00
Andrey Lushnikov
31460b18b8
Revert "api(waitUntil): remove waitUntil options from the actions ( #1834 )" ( #1840 )
...
This reverts commit d0b8710670
.
Reason: multiple test failures on all Linux bots
- https://app.circleci.com/pipelines/github/microsoft/playwright/613/workflows/50dc6e2d-23b0-41d2-9765-42983b0ed91d/jobs/610
- https://travis-ci.com/github/microsoft/playwright/builds/160648417
- https://github.com/microsoft/playwright/pull/1839/checks?check_run_id=594015893
2020-04-16 18:46:10 -07:00
Pavel Feldman
d0b8710670
api(waitUntil): remove waitUntil options from the actions ( #1834 )
2020-04-16 16:04:10 -07:00
Dmitry Gozman
af2340c35e
fix(click): explicitly fail when element detached during click ( #1835 )
...
We used to timeout instead.
2020-04-16 15:38:41 -07:00
Dmitry Gozman
f5942295d4
feat(api): wait for popups and downloads when performing actions ( #1744 )
2020-04-16 13:09:24 -07:00
Joel Einbinder
036f9e50fa
fix(webkit): allow fufilling requests to redirects ( #1830 )
2020-04-16 12:36:00 -07:00
Dmitry Gozman
5e18378df7
fix(webkit): do not access mainFrame when initialization has failed ( #1825 )
2020-04-16 10:59:27 -07:00
Pavel Feldman
08c8a74e09
docs(network): polish network docs ( #1826 )
2020-04-16 10:48:38 -07:00
Pavel Feldman
2280126344
api(setInputFiles): introduce page/frame helpers, document, break compat ( #1818 )
2020-04-16 10:25:28 -07:00
Joel Einbinder
1b0467fb86
fix(chromium): get headers from browser process when intercepting ( #1809 )
2020-04-15 23:18:16 -07:00
Dmitry Gozman
ba36860d79
feat(api): page.unroute to remove routes ( #1813 )
2020-04-15 19:55:22 -07:00
Dmitry Gozman
56aa4c2e71
fix(selectors): do not automatically enter shadow roots with >> ( #1812 )
...
Now that we have shadow-aware selector engines, this extra logic adds confusion
and does not help to actually query the element.
2020-04-15 16:12:45 -07:00
Dmitry Gozman
b0d79d5124
feat(shadow): make css pierce shadow by default ( #1784 )
...
We leave css:light, text:light, id:light, and similar to opt-out from the shadow dom piercing. The notable exception is xpath that is always light.
2020-04-15 10:16:29 -07:00
Andrey Lushnikov
0ba823dd6f
feat: introduce page.on('crash')
event ( #1782 )
...
Currently, whenever the page crashes, it emits an `'error'` event.
Error event is a special type of event in node.js; if unhandled,
it crashes the process.
Instead of emitting `'error'` event, this patch switches to emitting
`'crash'` event. Playwright users are free to handle the event
however they like, or just to ignore it.
2020-04-15 00:04:35 -07:00
Pavel Feldman
e9b470096d
chore: assert selector is a string ( #1795 )
...
Fixes #1735
2020-04-14 23:16:37 -07:00
Andrey Lushnikov
d07105aa0b
fix: do not capture exceptions while emitting events ( #1790 )
...
This could've caught user-land exception.
2020-04-14 22:41:45 -07:00
Craig Nishina
3167f2d34c
fix(chromium): prevent errors when frame does not exist when detaching from oopif ( #1767 )
...
When navigating away from the page loaded in `goto`, the frame no longer
exists. Page.removeFrameSession is called and throws an error. Instead
of calling the helper.assert method, moved removeChildFramesRecursively
into a conditional.
closes #1762
2020-04-14 19:01:01 -07:00
Pavel Feldman
da683b2752
feat(selectAll): allow selecting all in the inputs and in the plain dom ( #1783 )
2020-04-14 17:09:26 -07:00
Pavel Feldman
9d05038a82
feat(hints): hint at how waitFor(time) is bad for production ( #1781 )
2020-04-14 15:00:10 -07:00
Dmitry Gozman
2e6f544342
chore(webkit): stop using windowOpen signal to determine initial empty page ( #1776 )
2020-04-14 14:51:23 -07:00
Pavel Feldman
c2fc4035ba
doc(keyboard): document Shift+ArrowLeft notation ( #1771 )
2020-04-14 13:11:02 -07:00
Dmitry Gozman
9542f47511
feat(selectors): deep selector which pierces open shadow roots ( #1738 )
2020-04-13 13:04:27 -07:00
Joel Einbinder
a7572c7f09
feat: nicer error message for page.addScriptTag ( #1754 )
2020-04-12 18:46:53 -07:00
Pavel Feldman
368e1cc49b
chore(input): refactor keyboard layout, extract pure layout ( #1681 )
2020-04-11 00:24:17 -07:00
Pavel Feldman
9249f33709
feat(webkit): roll WebKit, migrate to Playwright.exe ( #1749 )
2020-04-10 21:02:28 -07:00
Yury Semikhatsky
a1ffed6052
fix(firefox): do not create first window on start ( #1727 )
2020-04-10 14:12:30 -07:00
Pavel Feldman
3584205086
fix(chromium): associate navigation requests with navigations ( #1724 )
2020-04-09 19:03:06 -07:00
Pavel Feldman
78abf5cb40
feat(api): add getAttribute, innerText, innerHTML, textContent ( #1717 )
2020-04-09 16:49:23 -07:00
Dmitry Gozman
5b4d32d375
fix(chromium): fix a race in persistent context launch ( #1702 )
...
We should stop attaching to existing targets immediately after Target.setAutoAttach response arrives, otherwise we have a window for double attach.
2020-04-08 11:18:06 -07:00
Yury Semikhatsky
a7ae205254
feat(firefox): support downloads ( #1689 )
2020-04-07 15:01:42 -07:00
Andrey Lushnikov
949dc7b514
chore: bump extract-zip dependency ( #1696 )
...
Fixes #1510
2020-04-07 14:56:30 -07:00
Pavel Feldman
c6f580faf8
chore: migrate from timeouts to deadlines internally ( #1695 )
2020-04-07 14:35:34 -07:00
Dmitry Gozman
e683c086de
fix(fill): make fill work with date/time inputs ( #1676 )
...
Date/time inputs are locale-specific, and also do not work with insertText. We just set the value on them and emulate input/change events. Note that some browsers do not support these input types just yet.
2020-04-07 10:07:06 -07:00
Andrey Lushnikov
e15fc08d46
chore: migrate node types to 10.17.17 ( #1690 )
2020-04-07 07:40:57 -07:00
Pavel Feldman
889cf8f7b6
fix(input): climb dom for pointer-events:none targets ( #1666 )
2020-04-06 20:44:54 -07:00
Pavel Feldman
3dc14eddaf
fix(colorScheme): make light scheme default on all browsers ( #1668 )
2020-04-06 19:49:33 -07:00
Dmitry Gozman
aeeac55732
feat(chromium): support oopifs ( #1664 )
...
Splits CRPage into CRPage and FrameSession, carefully broadcasting or picking the right session for each operation.
2020-04-06 15:09:43 -07:00
Andrey Lushnikov
65ca87cd9a
fix: fix PLAYWRIGHT_BROWSERS_PATH treatment ( #1662 )
...
Drive-by: introduce installation tests that use `npm pack`
to simulate installation from NPM registry.
Fixes #1651
2020-04-03 23:16:14 -07:00
Dmitry Gozman
a91304a37a
feat(selectors): attribute selectors pierce open shadow roots ( #1656 )
...
References #1375 .
2020-04-03 20:47:08 -07:00
Joel Einbinder
b7d0c32338
fix(browser): wait for the pipe to disconnect in browser.close ( #1652 )
...
With WebKit, sometimes the process closes before the stdio is streams are closed. I explicitly wait for the browser disconnect event now when closing.
2020-04-03 16:34:07 -07:00
Dmitry Gozman
f216ab98e7
chore(chromium): small improvement with updating touch ( #1659 )
2020-04-03 15:34:36 -07:00
Dmitry Gozman
270206e2b4
feat(text selector): match button input by value ( #1657 )
...
Inputs of type button and submit are rendered with their value as text,
so we match them by text.
Fixes #1427 .
2020-04-03 14:18:08 -07:00
Meir Blachman
f8ecdffd47
fix: typo in input.ts ( #1653 )
2020-04-03 14:01:40 -07:00
Dmitry Gozman
ea16e55ba3
fix(lint): import errors ( #1649 )
2020-04-02 20:30:52 -07:00
Dmitry Gozman
a9be3c5191
feat(text selector): pierce shadow roots ( #1619 )
2020-04-02 18:03:30 -07:00
Pavel Feldman
75571e8eb8
feat(downloads): support downloads on cr and wk ( #1632 )
2020-04-02 17:56:14 -07:00
Joel Einbinder
3d6d9db44a
fix: wait for the process to close when closing the browser ( #1629 )
2020-04-02 16:57:12 -07:00
Yury Semikhatsky
7c2ddc2e00
feat(firefox): support timezone override ( #1578 )
2020-04-01 22:10:56 -07:00
Pavel Feldman
e241c1bef8
chore: remove web mode ( #1625 )
2020-04-01 14:42:47 -07:00
Yury Semikhatsky
c218d8c25f
fix(firefox): isolate ignoreHTTPSErrors setting between contexts ( #1617 )
2020-04-01 12:59:48 -07:00
Dmitry Gozman
a7b61a09be
fix(text selector): by default, do a substring match ( #1618 )
2020-03-31 23:04:04 -07:00
Joel Einbinder
6053784188
feat: add missing slowMo to launchPersistentContext ( #1597 )
...
`slowMo` was missing in `launchPersistentContext`, and I refactored the types a bit.
2020-03-31 16:34:59 -07:00
Joel Einbinder
9e85f8d856
chore(waitForEvent): refactor waitForEvent into a single implementation ( #1602 )
...
Moves the `waitForEvent` implementation into an `ExtendedEventEmitter` class.
This is step one if we want to add `waitForEvent` to `Worker`, `Browser`, and `BrowserServer` objects. All of these only have a 'close' event, but I still feel we should be consistent with our event emitters.
2020-03-31 16:18:49 -07:00
Pavel Feldman
307b33ab7d
feat(chromium): roll to r754895 ( #1610 )
2020-03-31 13:23:08 -07:00
Andrey Lushnikov
950d427927
fix: catch websocket error events ( #1595 )
2020-03-30 18:18:38 -07:00
Pavel Feldman
1f08b72a27
test: add web socket leak test coverage ( #1586 )
2020-03-30 13:49:52 -07:00
Joel Einbinder
31f186cc3d
fix(browserFetcher): support macos 10.13 for firefox and chromium ( #1549 )
...
I don't have a macos 10.13 build to test on, and we aren't set up to compile it for WebKit. However there is a good chance this will work for Chromium and Firefox.
I also improved the error message received when on an unsupported platform.
#1535
2020-03-30 13:25:20 -07:00
Pavel Feldman
5499b1844d
feat(websocket): wrap firefox web socket too ( #1580 )
2020-03-28 10:14:59 -07:00
Pavel Feldman
48516ed7ed
feat(websocket): use proxy web socket on chromium ( #1573 )
2020-03-27 15:18:34 -07:00
Pavel Feldman
4e89939ece
chore: do not try/catch buffer.concat ( #1575 )
2020-03-27 15:16:17 -07:00
Pavel Feldman
00cb4e370f
chore: move transport to object messages ( #1567 )
2020-03-26 23:30:55 -07:00
Dmitry Gozman
b473d9dcf7
chore(firefox): remove FFPage._initialize to ensure early initialization ( #1554 )
2020-03-26 16:13:11 -07:00
Dmitry Gozman
bce8fc1343
feat(selectors): allow running selectors in main world ( #1533 )
2020-03-25 20:59:48 -07:00
Dmitry Gozman
c01ad84bd4
fix(fill): use isVisible to be consistent with waitForSelector ( #1539 )
...
Fixes #1442 .
2020-03-25 14:40:42 -07:00
Dmitry Gozman
60942d0af5
chore(selectors): move selectors logic to selectors.ts ( #1536 )
...
This encapsulates selectors logic in one place, in a preparation for more complex scenarios like main-world selectors or piercing frames.
Note: we had `Page.fill should wait for visible visibilty` test, but we do not actually wait for visible in page.fill(). It happened to pass due to lucky evaluation order.
References #1316 .
2020-03-25 14:08:46 -07:00
Max Schmitt
4b1fa2f2f9
feat: show warning on ff & wk if devtools was given ( #1463 )
...
Show just a warning instead of preventing the launch on Firefox and WebKit to minimize the error rate / entry barrier.
Not fully sure if `console.warn` is okay for that.
Closes #1440
2020-03-24 14:42:20 -07:00
Darío Kondratiuk
8d5433c8e3
fix(screenshotter) validateScreeshotOptions typo ( #1509 )
...
There is a type in the function name
2020-03-24 09:08:53 -07:00
Andrey Lushnikov
b778789ba8
feat: re-make global browser installation ( #1506 )
...
This patch removes the `PLAYWRIGHT_GLOBAL_INSTALL=1` variable
and instead introduces a new var - `PLAYWRIGHT_BROWSERS_PATH`.
You can specify `PLAYWRIGHT_BROWSERS_PATH` to affect where playwright
installs browsers and where it looks for browsers.
Fixes #1102
2020-03-24 00:08:00 -07:00
Dmitry Gozman
7ef394b345
chore(chromium): remove CRTarget, use CRPage and CRServiceWorker instead ( #1436 )
2020-03-23 21:48:32 -07:00
Yury Semikhatsky
7efff97753
fix(chromium): properly handle failures to set override ( #1498 )
2020-03-23 17:23:47 -07:00
Pavel Feldman
c0c9b7f137
test: make debugp collect IO (take 2) ( #1493 )
2020-03-23 15:08:02 -07:00
Dmitry Gozman
de0a2d1081
api(waitForLoadState): move waitUntil to be a first parameter ( #1490 )
2020-03-23 13:51:11 -07:00
Yury Semikhatsky
45a175d8fe
fix(chromium): ignore lifecycle events for the initial empty page ( #1486 )
2020-03-23 13:50:04 -07:00
Pavel
1ddf05113b
Revert "test: make debugp collect IO ( #1485 )"
...
This reverts commit b1bebdad2e
.
2020-03-23 13:48:22 -07:00
Pavel Feldman
b1bebdad2e
test: make debugp collect IO ( #1485 )
2020-03-23 13:42:51 -07:00
Dmitry Gozman
15fddb5177
api(click): rename offset to position ( #1488 )
...
To allow for features like position: 'center' or similar.
2020-03-23 12:05:08 -07:00
Pavel Feldman
15ebe1c339
feat(exposeFunction): implement context-level expose on firefox ( #1478 )
2020-03-22 22:45:15 -07:00
Pavel Feldman
c68cee9fb7
feat(offline): implement offline in firefox ( #1476 )
2020-03-22 15:34:30 -07:00
Dmitry Gozman
6e8895fa08
fix(firefox): make interception, locale and geolocation work on browser context level ( #1472 )
2020-03-22 08:56:50 -07:00
Pavel Feldman
1b08797c6f
tests(ff): uncomment a couple of firefox tests ( #1465 )
2020-03-21 17:58:33 -07:00
Dmitry Gozman
670ce7a591
chore: remove various watchers, use FrameTask directly ( #1460 )
2020-03-21 13:02:37 -07:00
Pavel Feldman
5a42cbd491
fix(permissions): manage permissions on the proxy level in webkit ( #1451 )
2020-03-20 19:45:35 -07:00
Pavel Feldman
e210e5601c
feat(lang): emulate language on firefox ( #1453 )
2020-03-20 19:32:27 -07:00
Pavel Feldman
c539325615
feat(geo): implement geo override in ff ( #1438 )
2020-03-20 19:17:46 -07:00
Yury Semikhatsky
bae56ea9d3
fix(chromium): support main resource request interception for popups ( #1449 )
2020-03-20 16:13:42 -07:00
Dmitry Gozman
16c7a5bd5c
api(eval): accept zero or one arguments in all evaluation functions ( #1431 )
2020-03-20 15:08:17 -07:00
Joel Einbinder
825555cddf
types: better types ( #1166 )
...
This generates typescript definitions based on the api.md, instead of autogenerating them from the typescript source code.
Now types
- only include the public api
- work with older versions of typescript
- include descriptions
- are more consistent
- are more complete
#6
2020-03-20 01:30:35 -07:00
Yury Semikhatsky
535b484637
api(context): get rid of PageEvent ( #1433 )
2020-03-19 16:25:12 -07:00
Yury Semikhatsky
3ed9970b33
api(chromium): add ChromiumBrowserContext.serviceWorkers() ( #1416 )
2020-03-19 16:10:24 -07:00
Dmitry Gozman
ea99908bf4
fix(eval): adopt nested handles ( #1430 )
...
We were only adopting top-level handles in FrameExecutionContext. Now we do that universally.
2020-03-19 13:07:33 -07:00
Andrey Lushnikov
f5ecbff16e
devops: remake downloading logic ( #1419 )
...
This patch:
- removes `browserType.downloadBrowserIfNeeded()` method. The method
turned out to be ill-behaving and cannot not be used as we'd like to (see #1085 )
- adds a `browserType.setExecutablePath` method to set a browser
exectuable.
With this patch, we take the following approach towards managing browser downloads:
- `playwright-core` doesn't download any browsers. In `playwright-core`, `playwright.chromium.executablePath()` returns `null` (same for firefox and webkit).
- clients of `playwright-core` (e.g. `playwright` and others) download browsers one way or another.
They can then configure `playwright` with executable paths and re-export the `playwright` object to their clients.
- `playwright`, `playwright-firefox`, `playwright-chromium` and `playwright-webkit` download
browsers. Once browsers are downloaded, their executable paths are saved to a `.downloaded-browsers.json` file. This file is read in `playwright/index.js` to configure browser executable paths and re-export the API.
- special case is `install-from-github.js` that also cleans up old browsers.
2020-03-19 11:43:35 -07:00
Pavel Feldman
2af07ce475
chore: rework disposers into a frame task ( #1413 )
2020-03-18 20:05:35 -07:00
Dmitry Gozman
7bd924673a
fix(PageEvent): properly wait for initial navigation in chromium and webkit ( #1412 )
2020-03-18 17:14:18 -07:00
Joel Einbinder
b0749e3a6d
fix(docs): fixup and lint optionals and return values in api.md ( #1376 )
...
Currently in our API `?` means null, but sometimes it means optional. Linting optional/nulls with this patch is required for #1166 to land nicely.
Previously, return types were not being linted in `api.md`. This is fixed, along with many broken return types.
This patch considers `?` to mean nullable, and has some heuristics to determine optionality. I believe this to be the minimal patch needed to unblock #1166 . After it lands, we can consider changing the api docs to hopefully remove some heuristics and strangeness.
2020-03-18 16:23:25 -07:00
Dmitry Gozman
a1929e20f5
feat(types): better types for nested handles ( #1424 )
...
References #1348 .
2020-03-18 15:19:58 -07:00
Dmitry Gozman
dd850ada89
api(eval): allow non-toplevel handles as eval arguments ( #1404 )
2020-03-18 10:41:46 -07:00
Yury Semikhatsky
b8e79e60c7
chore(chromium): remove obsolete target related code ( #1417 )
2020-03-17 22:07:20 -07:00
Pavel Feldman
049b336800
api(devices): extract isMobile/hasTouch from viewport ( #1415 )
2020-03-17 18:21:02 -07:00
Joel Einbinder
39e5eb7eda
feat(devices): remove name from device objects ( #1414 )
2020-03-17 16:04:42 -07:00
Pavel Feldman
e4225adcc0
feat(permissions): make origin optional ( #1406 )
2020-03-17 15:32:50 -07:00
Pavel Feldman
64b175ce10
api(waitForLoadState): restore it ( #1390 )
2020-03-16 14:39:44 -07:00
Dmitry Gozman
6731d37546
api(network): replace redirectChain with redirectedFrom/redirectedTo ( #1401 )
2020-03-16 13:31:06 -07:00
Joel Einbinder
6dcd6a6eec
fix(types): jsHandle.getProperty should never resolve to null ( #1402 )
...
Added a test to confirm that this was dead code.
2020-03-16 13:23:04 -07:00
Pavel Feldman
e692dd6e62
api(cdp): rename ChromiumSession to CDPSession ( #1380 )
2020-03-13 16:16:54 -07:00
Dmitry Gozman
a96dec58c8
fix(webkit): emit close on pages before clearing them ( #1386 )
2020-03-13 14:43:49 -07:00
Dmitry Gozman
69be12ae12
api(route): pass Route object instead of Request to route handlers ( #1385 )
...
References #1348 .
2020-03-13 14:30:40 -07:00
Dmitry Gozman
26479119b6
fix(setContent): handle inner _waitForLoadState rejection ( #1382 )
2020-03-13 13:09:06 -07:00
Dmitry Gozman
9b86c631c8
api: make BrowserContext.pages() synchronous ( #1369 )
...
Returns all pages which have been initialized already.
References #1348 .
2020-03-13 11:33:33 -07:00
Pavel Feldman
8aba111f1e
api(cdp): rename createSession to newCDPSession ( #1378 )
2020-03-13 09:00:03 -07:00
Pavel Feldman
b1a3b23c38
api(request): make request.response a promise ( #1377 )
2020-03-13 08:54:19 -07:00
Pavel Feldman
24d4fb1e5c
api(click): remove tripleclick, respect clickCount ( #1373 )
2020-03-13 08:09:48 -07:00
Pavel Feldman
8c532bd8da
api(press): remove text option ( #1372 )
...
#1348
2020-03-12 22:02:19 -07:00
Pavel Feldman
e1d3196460
api(*.selectOption): renamed from *.select ( #1371 )
2020-03-12 21:30:12 -07:00
Pavel Feldman
064099ab3c
api(keyboard.insertText): renamed from sendCharaters ( #1370 )
2020-03-12 20:56:52 -07:00
Pavel Feldman
9aa56a6b9e
api(browserType): remove devices, errors ( #1368 )
2020-03-12 17:58:00 -07:00
Pavel Feldman
cfd3ae25fb
api(addCookies): setCookies -> addCookies ( #1367 )
...
#1348
2020-03-12 17:32:33 -07:00
Dmitry Gozman
3fa4255bc5
api: make request.postData() return null instead of undefined ( #1366 )
2020-03-12 16:53:04 -07:00
Dmitry Gozman
e382bb329b
api: remove 'commit' phase, actions to wait until 'domcontentloaded' by default ( #1358 )
2020-03-12 11:20:03 -07:00
Dmitry Gozman
7c59f9ca9a
fix: do not wait for navigations while evaluating injected source ( #1347 )
2020-03-11 22:52:03 -07:00
Pavel Feldman
b43f33f4d3
api(review): misc changes to API. ( #1356 )
2020-03-11 18:10:48 -07:00
Dmitry Gozman
c1ef683373
api: remove waitForLoadState() in favor of PageEvent.page(options) ( #1323 )
2020-03-11 14:46:52 -07:00
Pavel Feldman
5d4fdd050a
feat(webkit): roll webkit to 1178 ( #1339 )
2020-03-11 14:08:22 -07:00
Dmitry Gozman
3dd49459bb
fix(chromium): install binding function during initialization ( #1320 )
2020-03-10 16:19:01 -07:00
Andrey Lushnikov
65d10a5d5d
fix: re-implement slow-mo transport without message serialization ( #1328 )
...
With this implementation, `slowMo` will throttle all `outbound`
messages.
Fixes #1214
2020-03-10 15:57:39 -07:00
Pavel Feldman
0077b428fc
feat(webkit): emulate device size ( #1318 )
2020-03-10 13:16:33 -07:00
Dmitry Gozman
23cf3be828
api: make request.frame() non-null ( #1319 )
2020-03-10 11:39:35 -07:00
Dmitry Gozman
d5a2781e80
fix(chromium): do not await extra promises in initialize() to attach early enough ( #1311 )
2020-03-10 10:06:17 -07:00
Dmitry Gozman
ea6978a3d8
api(popups): expose BrowserContext.route() ( #1295 )
2020-03-09 21:02:54 -07:00
Yury Semikhatsky
9bd3711394
fix(context): reliably fire BrowserContext.Close event when browser is closing ( #1277 )
2020-03-09 16:53:33 -07:00
Dmitry Gozman
eb2ca70955
api(route): allow fulfilling with a file path ( #1301 )
2020-03-09 16:12:00 -07:00
Yury Semikhatsky
0fbc7af26d
chore(targets): create page targets only when attached to them ( #1278 )
2020-03-09 15:53:45 -07:00
Andrey Lushnikov
e650628e3d
fix(chromium): fix device-related media queries ( #1299 )
...
References #1291
2020-03-09 15:53:31 -07:00
Dmitry Gozman
c43de22193
chore(wk, ff): simplify target management ( #1279 )
2020-03-09 12:32:42 -07:00
Pavel Feldman
2fa2421894
fix(webkit): fail the 204 navigations ( #1260 )
2020-03-09 11:42:56 -07:00
Andrey Lushnikov
d1ef0c8694
fix(wk,ff): properly support getting and setting non-session cookies ( #1280 )
2020-03-07 08:41:57 -08:00
Yohix
bfd32fe6d2
doc: fix typos ( #1284 )
2020-03-07 08:37:47 -08:00
Pavel Feldman
78bd29d558
fix(click): work around input alignment on chromium ( #1282 )
2020-03-07 08:19:31 -08:00
Dmitry Gozman
68b4079748
chore: remove WKPage._sessions ( #1270 )
2020-03-06 16:51:45 -08:00
Dmitry Gozman
aee6324bba
feat(firefox): roll firefox ( #1273 )
2020-03-06 16:49:48 -08:00
Pavel Feldman
3c35d7b058
api(waitFor): click(waitFor) -> click(force) ( #1275 )
2020-03-06 16:24:21 -08:00
Yury Semikhatsky
8211287a23
fix(session): use isolated root session for client page sessions ( #1271 )
2020-03-06 15:11:03 -08:00
Pavel Feldman
3fa000f5f4
api(waitForSelector): bring it back ( #1272 )
2020-03-06 15:02:42 -08:00
Pavel Feldman
119df5a985
feat(nowait): allow waitUntil:nowait for actions ( #1264 )
2020-03-06 14:32:15 -08:00
Andrey Lushnikov
c494944b46
api(popups): move Page.authenticate to BrowserContext.setHTTPCredentials ( #1267 )
...
Drive-by: fixes #720 since it rolls past r1037.
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2020-03-06 13:50:42 -08:00
Dmitry Gozman
d1146204bf
chore: remove WKPageProxy, use WKPage instead ( #1256 )
2020-03-06 11:41:46 -08:00
Pavel Feldman
49c1161e00
api(press): bump .press to the page/frame level ( #1262 )
2020-03-06 09:38:08 -08:00
Pavel Feldman
2724157c22
feat(waitUntil): allow waiting for navigation from clicks, etc ( #1255 )
2020-03-06 08:24:32 -08:00
Dmitry Gozman
1d770af804
api: waitForElement accepts waitFor: attached|detached|visible|hidden ( #1244 )
...
This includes rename waitForSelector -> waitForElement and removes $wait.
2020-03-05 17:45:41 -08:00
Yury Semikhatsky
9bc6dcea1d
feat(api): introduce BrowserContext.waitForEvent ( #1252 )
2020-03-05 17:22:57 -08:00
Dmitry Gozman
e5f82af47c
api(popups): emit PageEvent immediately, and resolve page() once initialized ( #1229 )
...
This way we do not miss any popups, even immediately closed ones.
2020-03-05 15:18:27 -08:00
Pavel Feldman
c734b4b715
feat(click): start wire auto-waiting click in firefox ( #1233 )
2020-03-05 14:47:04 -08:00
Yury Semikhatsky
e770d706a1
fix(chromium): do not create default page and context in headless ( #1247 )
2020-03-05 14:46:12 -08:00
Yury Semikhatsky
665888d579
feat(popups): auto-attach to all pages in Chromium ( #1226 )
2020-03-05 10:45:32 -08:00
Yury Semikhatsky
aabdac8380
api: remove Page.setCacheEnabled ( #1231 )
2020-03-05 10:09:04 -08:00
Pavel Feldman
11f68bac54
feat(cr, wk): make clicks, input and evaluate await scheduled navigations ( #1200 )
2020-03-04 19:15:01 -08:00
Dmitry Gozman
7f9df9488e
api(popups): move Page.setOfflineMode -> BrowserContext.setOffline ( #1223 )
2020-03-04 17:58:12 -08:00
Dmitry Gozman
3bedc60b2b
fix(dispose): do not await inner handle dispose ( #1230 )
2020-03-04 17:57:35 -08:00
Dmitry Gozman
5ee744cd26
api(page.frame): allow looking up frames by name ( #1228 )
2020-03-04 17:53:39 -08:00
Pavel Feldman
5ff660de15
feat(navigation): waitForNavigation/goto should not wait until response finished ( #1225 )
2020-03-04 15:59:26 -08:00
Joel Einbinder
8aa88d5021
fix(doc): check and update optional types in the api ( #1206 )
...
This adds a new check to doclint for whether a member is correctly marked as optional.
part of #6
2020-03-03 17:29:12 -08:00
Dmitry Gozman
f4e9b5079d
api: declare not supporting isMobile on Firefox ( #1207 )
2020-03-03 17:28:31 -08:00
Dmitry Gozman
1c4619e5e0
fix(chromium/webkit): fix a race between Page.enable and Page.getResourceTree ( #1201 )
2020-03-03 17:15:43 -08:00
Dmitry Gozman
15c70c9d61
fix(click): timing out in page while waiting for interactable should have proper error ( #1199 )
...
This fixes flaky 'Page.click should timeout waiting for visible' test.
2020-03-03 17:14:00 -08:00
Joel Einbinder
fcfe887c57
feat(select): don't accept undefined as a value ( #1202 )
...
`page.select` accepting an `undefined` value is a legacy of when `page.select` took `...values`. This matches the way the method is documented in the API.
2020-03-03 16:59:41 -08:00
Dmitry Gozman
6c6cdc033b
api(popup): introduce BrowserContext.exposeFunction ( #1176 )
2020-03-03 16:46:06 -08:00
Dmitry Gozman
1b863c2300
fix(screenshots): simplify implementation, allow fullPage + clip, add tests ( #1194 )
2020-03-03 16:09:32 -08:00
Yury Semikhatsky
31e26a2208
fix(api): fire BrowserContext.Page event in WebKit and Firefox ( #1186 )
2020-03-02 18:32:56 -08:00
Dmitry Gozman
342a2cf5cc
fix(selectors): continue matching after first fail for combined selectors ( #1185 )
2020-03-02 15:47:50 -08:00
Dmitry Gozman
1186998bd8
fix(click): wait for element to be displayed before scrolling into view ( #1182 )
...
Otherwise, we may get an error during scrollIntoViewIfNeeded protocol call.
2020-03-02 14:26:38 -08:00
Yury Semikhatsky
a57978a5f0
api(chromium): remove Target from public API ( #1163 )
2020-03-02 13:58:22 -08:00
Yury Semikhatsky
f242e0c74f
fix: make Transport.send() synchronous ( #1177 )
2020-03-02 13:51:32 -08:00
Andrey Lushnikov
08fbc92752
feat: support PLAYWRIGHT_DOWNLOAD_HOST
( #1179 )
...
This patch starts respecting `PLAYWRIGHT_DOWNLOAD_HOST` env variable
in `playwright` package and it's vendored flavors (`playwright-firefox`,
`playwright-chromium` and `playwright-webkit`).
Fixes #1045
2020-03-02 13:45:10 -08:00
Dmitry Gozman
ac2f04f10f
api(selectors): pass selector name when registering, allow file path ( #1162 )
2020-02-28 15:34:07 -08:00
Dmitry Gozman
7843c29d32
feat(selectors): auto-detect each selector part ( #1160 )
2020-02-28 14:41:32 -08:00
Dmitry Gozman
823bf389a7
api: evaluateOnNewDocument -> addInitScript ( #1152 )
...
Also adds more options to specify the script.
2020-02-27 17:42:14 -08:00
Joel Einbinder
857ffd8ea9
fix: text selector should be case insensitive without quotes ( #1151 )
2020-02-27 16:52:30 -08:00
Dmitry Gozman
7682865d73
feat(popups): add BrowserContext.evaluateOnNewDocument ( #1136 )
2020-02-27 16:18:33 -08:00
Pavel Feldman
dc161df063
fix(launch): throw upon page argument when non-persistent ( #1144 )
2020-02-27 14:09:24 -08:00
Yury Semikhatsky
9d6aa967f3
chore(workers): align worker lifecycle evens with other APIs ( #1147 )
2020-02-27 14:02:48 -08:00
Dmitry Gozman
c6fde22b1f
chore(webkit): always attach to all pages, simplify initialization ( #1139 )
2020-02-27 08:49:09 -08:00
Andrey Lushnikov
4ebf419259
fix(yarn): download browsers to package directories ( #1133 )
...
This patch makes it so all our packages, like `playwright` and
browser-specific flavors, download browsers to their
directories rather then using directory of `playwright-core`.
This way yarn@1 caches are not busted: they didn't expect that directory
content might change after packages's explicit install step
is failed, there's that was what we were doing.
Fixes #1085
2020-02-26 15:13:31 -08:00
Andrey Lushnikov
4ab880175a
chore: fix lint
2020-02-26 14:08:21 -08:00
Pavel Feldman
d20f3cac89
feat(webkit): no start window, healthy pipe ( #1113 )
2020-02-26 13:02:15 -08:00
Dmitry Gozman
672f3f9960
feat(popups): introduce BrowserContext.setDefaultHTTPHeaders ( #1116 )
2020-02-26 12:42:20 -08:00
Yury Semikhatsky
4f69930fbe
fix(chromium): make locale overrides work ( #1108 )
2020-02-26 11:01:46 -08:00
Pavel Feldman
3afaeef557
feat(socket): destroy contexts upon disconnect ( #1119 )
2020-02-26 11:01:01 -08:00
Dmitry Gozman
dcdc7db158
feat(chromium): use no-startup-window to not create default context ( #1106 )
2020-02-25 11:43:17 -08:00
Pavel Feldman
ebcaadedf1
feat(log): log only user api calls with DEBUG=pw:api ( #1029 )
2020-02-25 07:09:27 -08:00
Dmitry Gozman
d97ea70804
chore: move more injected code to injected to reduce evaluation size ( #1093 )
2020-02-25 07:06:20 -08:00
Dmitry Gozman
ba29470cc1
fix(api): rename relativePoint to offset, remove unused parameters from input ( #1092 )
2020-02-24 21:12:02 -08:00
aesyondu
fdfec8eb2a
fix(platform) instanceof bug between execution contexts of RegExp object ( #1048 )
...
First encountered at jest-playwright repo:
https://github.com/mmarkelov/jest-playwright/issues/38
Solution based on:
https://stackoverflow.com/questions/4339288/typeof-for-regexp#comment4724685_4339350
2020-02-24 18:32:17 -08:00
Dmitry Gozman
6acc439450
feat(api): move targets from CRBrowser to CRBrowserContext ( #1089 )
...
This makes them work for default context.
2020-02-24 14:35:51 -08:00
Dmitry Gozman
a43b4095e1
chore: make BrowserContext an interface, with 3 implementations ( #1075 )
...
This is in preparation for moving targets to BrowserContext, so that one can work with targets in default context.
2020-02-24 08:53:30 -08:00
Dmitry Gozman
3677818202
fix(api): browser.serviceWorker -> target.serviceWorker ( #1076 )
2020-02-24 08:31:58 -08:00
Dmitry Gozman
1f8508d1ed
feat(waitFor): update various waitFor options to be a single boolean ( #1066 )
2020-02-22 09:16:28 -05:00
Dmitry Gozman
40164298a8
api: remove ElementHandle.visibleRatio ( #1069 )
2020-02-19 16:08:25 -08:00
Dmitry Gozman
33824aa1d7
feat(click): waitForInteractable option, defaults to true ( #934 ) ( #1052 )
2020-02-19 09:34:57 -08:00
Dmitry Gozman
9f1edadbff
fix(navigation): do not count random failures as navigation cancel ( #1055 )
2020-02-18 19:58:04 -08:00
Dmitry Gozman
223685ee7b
chore: strip out injected script from protocol logs ( #1054 )
2020-02-18 19:56:59 -08:00
Pavel Feldman
1ee657823e
feat(viewport): update defaults to 1280x720, fix Firefox ( #1038 )
2020-02-18 09:16:32 -08:00
Pavel Feldman
f2b2d72693
fix(input): emit change events upon page.setInputFiles ( #1028 )
2020-02-18 09:15:47 -08:00
Daniel Imms
8a7728da3d
docs: document LaunchOptions.dumpio ( #1051 )
2020-02-18 08:56:20 -08:00
Joel Einbinder
3656403f2d
fix(keyboard): Add mac editing commands for NumpadEnter ( #1026 )
...
This should fix NumpadEnter on webkit for mac.
2020-02-14 18:37:02 -08:00
Joel Einbinder
21acb369db
fix(keyboard): correctly press enter on firefox ( #1023 )
2020-02-14 17:42:08 -08:00
Dmitry Gozman
dbb45d443a
Revert "feat(click): waitForInteractable option, defaults to true ( #934 )" ( #1013 )
...
Reason: new tests are flaky on all bots.
2020-02-14 13:05:23 -08:00
Dmitry Gozman
9413351d3f
feat(click): waitForInteractable option, defaults to true ( #934 )
2020-02-14 11:55:34 -08:00
Pavel Feldman
4d7e531520
fix(webkit): wait for the pipe ready on windows ( #997 )
2020-02-13 17:46:40 -08:00
Pavel Feldman
cd4e9da807
feat(coverage): export raw v8 coverage ( #976 )
...
Fixes #955
2020-02-13 17:39:14 -08:00
Dmitry Gozman
25022e4685
feat(api): introduce default timeouts on BrowserContext ( #992 )
2020-02-13 14:18:18 -08:00
Pavel Feldman
f7fb35bdbf
fix(windows): wait for pipe available again ( #993 )
2020-02-13 14:13:10 -08:00
Andrey Lushnikov
f8f818f676
Revert "Revert "feat: do not wait for first page in non-persistent mode ( #939 )""
...
Apparently a good fix is coming: https://github.com/microsoft/playwright/pull/993/
Pavel want to re-revert.
2020-02-13 13:54:01 -08:00
Andrey Lushnikov
71892b4aaa
Revert "feat: do not wait for first page in non-persistent mode ( #939 )"
...
This reverts commit a567123596
.
Reason for revert: WK-Win fails to start if we start talking over the
pipe too early.
2020-02-13 13:44:58 -08:00
Pavel Feldman
c15534ff01
fix(locale): document locale parameter ( #990 )
2020-02-13 13:37:59 -08:00
Dmitry Gozman
2e0d89e25c
fix(firefox): roll to 1029 and unskip passing tests ( #984 )
2020-02-13 13:19:25 -08:00
Pavel Feldman
8ed88c910a
feat(webkit): introduce BrowserContext({language}) ( #972 )
2020-02-13 12:24:17 -08:00
Andrey Lushnikov
8006b2c01f
fix(webkit): avoid UnhandledPromiseRejection ( #986 )
...
* fix(webkit): avoid UnhandledPromiseRejection
If we close a browser before sending first websocket message,
the `this._connect` promise will reject and will not be handled.
This surfaced at https://github.com/microsoft/playwright/pull/976/checks?check_run_id=444445350
* fix
2020-02-13 12:19:41 -08:00
Pavel Feldman
53fa62910a
fix(chromium): emit focus events in headful ( #982 )
...
Fixes #979
2020-02-13 11:29:13 -08:00
Dmitry Gozman
a567123596
feat: do not wait for first page in non-persistent mode ( #939 )
2020-02-13 10:51:17 -08:00
Joel Einbinder
d367a2ed3a
chore(tests): log protocol messages when a test fails on the bots ( #963 )
...
Similarly to how we handle stdio, this captures all protocol messages and logs them when a test fails. Great for when debugging tests in parallel or for bot failures!
Currently I made `DEBUGP=true` turn this on locally, and turned it on always for the CI. Open to
suggestions for a better environment variable. I would turn it on by default always, like the stdio logging, but it adds an enormous amount of noise to our error messages.
2020-02-12 22:35:06 -08:00