Commit graph

1048 commits

Author SHA1 Message Date
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
Pavel Feldman ef9e04d399
fix(permissions): fix notifications permissions on firefox (#1531) 2020-03-25 11:52:50 -07:00
Yury Semikhatsky 2d5b701662
test(firefox): fix should close browser with beforeunload page (#1532) 2020-03-25 08:29:29 -07:00
Pavel Feldman 5bde0b59b5
feat(auth): fix firefox auth flake (#1525) 2020-03-24 23:12:07 -07:00
Dmitry Gozman 4f89e4031c
test: fix flaky interception test (#1508) 2020-03-24 09:08:29 -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
Yury Semikhatsky afbc2f272a
test(firefox): enable passing "userDataDir option should restore cookies" (#1487) 2020-03-23 14:59:29 -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 23e5d80e06
test: uncomment slow ff tests (#1479) 2020-03-22 22:16:39 -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
Dmitry Gozman 3f90c09e6d
tests: mark popup tests as passing on Firefox (#1466) 2020-03-21 19:56:33 -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
Dmitry Gozman 60a248ef42
test: add test for Map as eval argument (#1457) 2020-03-20 21:24:34 -07:00
Yury Semikhatsky 34cc358ad3
tests(webkit): reenable should await promise from popup (#1447) 2020-03-20 21:22:48 -07:00
Dmitry Gozman e115e8e2a9
tests: mark tests that launch() twice or use fixtures as slow (#1455) 2020-03-20 19:49:35 -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
Yury Semikhatsky 4320d4ba83
test: fix link navigation test so that it passes in Chromium (#1448) 2020-03-20 15:45:20 -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
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
Dmitry Gozman dd850ada89
api(eval): allow non-toplevel handles as eval arguments (#1404) 2020-03-18 10:41:46 -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
Darío Kondratiuk 840146273e
test(web): Remove unused variable (#1410) 2020-03-17 09:05:33 -07:00
Dmitry Gozman aa32d351be
fix(tests): remove flaky load event from auto-waiting tests (#1399)
We do not guarantee that click resolves before load event comes.
Theoretically, inserting two tasks before resolving load should help,
but seems like a strange contract.

Drive-by: move auto waiting tests to a separate file.
2020-03-16 18:33:39 -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 e4991a1489
tests: add some failing page event tests (#1394) 2020-03-14 19:14:46 -07:00
Pavel Feldman e692dd6e62
api(cdp): rename ChromiumSession to CDPSession (#1380) 2020-03-13 16:16:54 -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 601d57a300
test: add a test for popup with window features (#1381) 2020-03-13 13:08:35 -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
Dmitry Gozman 0d7cb29329
test: continue running tests after crash, report crashes separately (#1362) 2020-03-12 17:32:53 -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
Andrey Lushnikov 1cd00bd068
feat(testrunner): allow filtering by name and show all focused tests (#1354) 2020-03-11 18:30:43 -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 9b8f4a2246
test(webkit): uncomment fixed viewport screenshot tests (#1346) 2020-03-11 14:37:06 -07:00
Dmitry Gozman 7e8ab8a175
test: await setInputFiles in flaky input tests (#1345) 2020-03-11 14:35:48 -07:00
Dmitry Gozman 823fffaa65
test: declare setInterval click test as undefined behavior (#1343) 2020-03-11 14:33:55 -07:00
Pavel Feldman 401a916732 test(webkit): uncomment clearCookies test w/ right expectations 2020-03-10 20:06:29 -07:00
Dmitry Gozman 3dd49459bb
fix(chromium): install binding function during initialization (#1320) 2020-03-10 16:19:01 -07:00
Pavel 6b711f57fa test(webkit): unblock and uncomment sync window.stop test 2020-03-10 15:17:59 -07:00
Joel Einbinder 0d2ae91fac
fix(test): enable presssing in frames test (#1326)
Fixes #1265
2020-03-10 14:47:52 -07:00
Andrey Lushnikov 0cff9df00f
test: add failing test for clicking and oopifs (#1325) 2020-03-10 14:24:25 -07:00
Pavel Feldman 0077b428fc
feat(webkit): emulate device size (#1318) 2020-03-10 13:16:33 -07:00
Pavel Feldman 044f774458 test: unflake should fail when frame detaches 2020-03-10 13:14:35 -07:00
Andrey Lushnikov 59f2e888ca
test: mark test as flaky on Firefox (#1321)
Run: https://github.com/microsoft/playwright/pull/1320/checks?check_run_id=498666394
2020-03-10 12:56:32 -07:00
Andrey Lushnikov ac5b518bea
test: mark as flaky according to the new policy (#1322)
Closes #1300, #1303, #1305
2020-03-10 12:56:18 -07:00
Pavel a9b7bcf905 test(webkit): expect cookies to be deleted after reload 2020-03-10 11:29:29 -07:00
Andrey Lushnikov 92aa4f375a
test: stop sourceServer as well (#1314) 2020-03-10 10:23:17 -07:00
Dmitry Gozman 38c3837b3e
test: remove test which is inherently racy (#1313)
page.evaluate() sometimes triggers navigation fast enoguh, so that
next page.setContent() has no execution context to evaluate in.
2020-03-10 10:11:44 -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
Andrey Lushnikov adee9a9bd3 test: mark worker.url() API coverage as missing
References #1300
2020-03-09 18:46:39 -07:00
Andrey Lushnikov 72ae5c8ceb
test: remove stray test (#1302)
Fixes #1294
2020-03-09 18:31:56 -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
Andrey Lushnikov 27eb25acef test: disable flaky test on Firefox Linux
References #1303
2020-03-09 16:13:36 -07:00
Dmitry Gozman eb2ca70955
api(route): allow fulfilling with a file path (#1301) 2020-03-09 16:12:00 -07:00
Dmitry Gozman cf46f1b056
test(chromium): mark passing popup tests as passing (#1297) 2020-03-09 16:06:30 -07:00
Andrey Lushnikov ca5ce7df96 test: disable flaky worker tests on firefox
References #1300
2020-03-09 16:00:23 -07:00
Andrey Lushnikov e650628e3d
fix(chromium): fix device-related media queries (#1299)
References #1291
2020-03-09 15:53:31 -07:00
Andrey Lushnikov a61d0660a1
test: add failing test for min-device-width media queries (#1298)
References #1291
2020-03-09 14:58:38 -07:00
Pavel Feldman 2fa2421894
fix(webkit): fail the 204 navigations (#1260) 2020-03-09 11:42:56 -07:00
Andrey Lushnikov 071ee06404
chore: normalize NPM scripts (#1285)
This patch:
- makes `npm run cunit/wunit/funit` and `npm run ctest/ftest/wtest` run
browser-specific tests only
- makes `npm run unit` and `npm run test` run *all* browser tests
- runs *all* our infrastructure tests as part of `npm run lint`

As a result, if there's one test to be tested across all three browsers,
you can focus it and do `npm run test`;
2020-03-07 17:09:38 -08: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
Pavel Feldman 3c35d7b058
api(waitFor): click(waitFor) -> click(force) (#1275) 2020-03-06 16:24:21 -08:00
Andrey Lushnikov 578880cb8b test: mark test as slow 2020-03-06 15:55:04 -08:00
Andrey Lushnikov e604acd5fa test: disable flaky test on WebKit 2020-03-06 15:24:26 -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
Andrey Lushnikov ca6faf2e4c chore: properly mark failint tests 2020-03-06 13:34:29 -08:00
Andrey Lushnikov cf820b5269 test: mark failing tests on WebKit 2020-03-06 12:24:21 -08:00
Andrey Lushnikov 8cc7d43a83 tests: disable failing test on chromium 2020-03-06 11:45:13 -08:00
Pavel Feldman 677ebf882f test: mark "clicking anchor should await navigation" as failing on chromium 2020-03-06 10:54:34 -08:00
Pavel Feldman f3734c3e86 test: mark "should await navigating specified target" as failing on chromium 2020-03-06 10:44:44 -08:00
Pavel Feldman 328805747f test(webkit): disable failing wk test 2020-03-06 10:20:15 -08:00
Pavel Feldman a802b00880 test: oops - fdescribe 2020-03-06 09:42:13 -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
Dmitry Gozman cd8714d573
tests: skip failing waitForNavigation test in Chromium (#1248) 2020-03-05 13:28:45 -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 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
Yury Semikhatsky 771793f418
test(context): test that context.close() works for empty context (#1205) 2020-03-03 23:04:08 -08:00
Dmitry Gozman f4e9b5079d
api: declare not supporting isMobile on Firefox (#1207) 2020-03-03 17:28:31 -08:00
Dmitry Gozman 33f3e5724b
test: skip flaky 'Page.goto extraHttpHeaders should be pushed to provisional page' (#1203) 2020-03-03 17:26:58 -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
Yury Semikhatsky 4556513c2a
chore(test): test cleanup (#1198) 2020-03-03 16:58:37 -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
Dmitry Gozman 2ec9e6daa2
test: cleanup some test files (#1195) 2020-03-03 15:02:06 -08:00
Yury Semikhatsky 4a9a155838
test: enable page opener test on WebKit (#1193) 2020-03-03 14:11:17 -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
Pavel 342e79c5b4 test: mark some tests as skipped (3) 2020-03-02 15:13:15 -08:00
Pavel 2f98b5e26a test: mark some tests as skipped (2) 2020-03-02 15:08:15 -08:00
Pavel ba06fb2f0d test: mark some tests as skipped 2020-03-02 14:57:54 -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
Pavel Feldman 5bd6e4970b
test: it.skip skips and it.fail expects to fail now (#1178) 2020-03-02 13:47:08 -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 82a4ede6dc
chore: roll Chromium to 745253 (#1156) 2020-02-28 09:02:26 -08:00
aesyondu 041b8c6e01
chore: fix typo on sepcified -> specified (#1153) 2020-02-27 17:44:19 -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
Yury Semikhatsky 6b6a671754
fix(webkit): pass popup tests (#1138) 2020-02-27 08:43:01 -08:00
Andrey Lushnikov 22c28b6615
test(firefox): support loading of file URLs (#1132)
Fixes #822
2020-02-26 15:02:59 -08:00
Pavel 5cfe68d878 test: uncomment webkit fix 2020-02-26 14:16:14 -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
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
Joel Einbinder a6c3735b9d
test: add failing drag and drop test (#1095)
The test file comes from mdn: https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setData

References #1094
2020-02-24 18:25:47 -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 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
Andrey Lushnikov 88e310942b
test: fix test on Firefox Linux (#1079) 2020-02-21 13:21:45 -08:00
Andrey Lushnikov f305d6594e chore: remove focused test 2020-02-21 13:12:57 -08:00
Andrey Lushnikov 66362a5687 chore: update appveyour config 2020-02-21 13:09:36 -08:00
Andrey Lushnikov 0ded511d0b
feat(testrunner): better matchers (#1077)
This patch re-implements matching and reporting for test runner.
Among other improvements:
- test failures now show a short snippet from test
- test failures now explicitly say what received and what was expected
- `expect.toBe()` now does text diff when gets strings as input
- `expect.toEqual` now does object diff
2020-02-20 22:55:39 -08:00
Andrey Lushnikov 05a1e1c641
test: remove newContext and newPage test helpers (#1070)
All tests should clean up their contexts themselves.
2020-02-20 15:15:48 -08:00
Dmitry Gozman 40164298a8
api: remove ElementHandle.visibleRatio (#1069) 2020-02-19 16:08:25 -08:00
Joel Einbinder 568c6cbb54
test(navigation): fix flaky networkidle tests (#1058)
The network idle tests were waiting for requests to appear on the server, but not for playwright to be notified of the request via protocol. They also assumed performance.now would match up with setTimeout times.
2020-02-19 14:26:02 -08:00
Dmitry Gozman 84ee297c4b
test: add a test for bounding box on partially visible element (#1011) 2020-02-19 16:08:29 -06:00
Andrey Lushnikov 4be48a6b1b chore: disable DEBUGP on bots 2020-02-19 14:07:36 -08:00
Dmitry Gozman 33824aa1d7
feat(click): waitForInteractable option, defaults to true (#934) (#1052) 2020-02-19 09:34:57 -08:00
Dmitry Gozman 1805acd5d5
test: update animation click test (#1053) 2020-02-18 14:30:56 -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
Pavel Feldman e65897844f
test: add screenshot test that fails on Chromium (#1039) 2020-02-15 16:34:27 -08:00
Darío Kondratiuk cfeaecb3d2
test(keyboard): Remove duplicated test (#1031) 2020-02-15 14:58:07 -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
Andrey Lushnikov 5695ade926
test: add failing test for Firefox (#1019)
References #1009
2020-02-14 17:02:22 -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
Dmitry Gozman 1eabd182e9
test(firefox): unskip passing url hash test (#998) 2020-02-13 18:22:14 -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
Andrey Lushnikov 7ec3bf4d94 test: fix locale tests on mac 2020-02-13 17:03:35 -08:00
Andrey Lushnikov b181b34e2e test: attempt to normalize locale tests 2020-02-13 15:32:39 -08:00
Pavel Feldman b96d985d12
test: fix locale expectations on non-Mac (#994) 2020-02-13 15:12:54 -08:00
Dmitry Gozman 25022e4685
feat(api): introduce default timeouts on BrowserContext (#992) 2020-02-13 14:18:18 -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 cb63021b2f
test: add test for navigator.userAgent in popups (#985) 2020-02-13 13:23:29 -08:00
Andrey Lushnikov 05f8d001f8
test: fix service worker test (#988)
Do the following to ensure SW is active and serves requests:
- in ServiceWorker, claim all clients once activated
- in page, await activation promise instead of a registration
2020-02-13 13:21:19 -08:00
Dmitry Gozman 2e0d89e25c
fix(firefox): roll to 1029 and unskip passing tests (#984) 2020-02-13 13:19:25 -08:00
Joel Einbinder d790b4c280
fix(test): default DEBUGP to false (#989) 2020-02-13 13:18:19 -08:00
Pavel Feldman 8ed88c910a
feat(webkit): introduce BrowserContext({language}) (#972) 2020-02-13 12:24:17 -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
Pavel Feldman 8abf35c8e4
feat(webkit): roll webkit to 1148 (#971) 2020-02-12 21:25:17 -08:00
Andrey Lushnikov d735de5347
feat: do not let users pass userDataDir to browserType.launch() (#974)
We now have a separate method for this - `browserType.launchPersistent`.
This will probably save our users quite some time.
2020-02-12 19:32:23 -08:00
Pavel Feldman 012bf671b8
feat(webkit): emulate timezone on webkit (#968) 2020-02-12 17:02:59 -08:00
Dmitry Gozman fbce2908ad
test: unskip passing Firefox tests (#966) 2020-02-12 16:27:45 -08:00
Andrey Lushnikov bfaf191c98
test: add missing tests (#965)
Chromium tests on Linux now call all our API methods and events at least once!
2020-02-12 16:13:48 -08:00
Dmitry Gozman 1d84f38e5e
fix(input): ensure input works as expected with page scale (#962) 2020-02-12 16:13:21 -08:00
Andrey Lushnikov 7ce49c2835
chore: remove WebSocket implementation (#961)
WebSocket implementation currently is very incomplete, lacking
support in WebKit-Win and Firefox.
2020-02-12 15:29:06 -08:00
Dmitry Gozman 5f24205922
test: add a test for interception + service worker (#951) 2020-02-12 13:02:27 -08:00
Pavel Feldman c8c4356d7c
test: add setInputFiles input event test (#944) 2020-02-11 20:18:41 -08:00
Pavel Feldman d05feec740
feat(active): emulate active state on webkit (#941) 2020-02-11 19:10:57 -08:00
Dmitry Gozman da30847c83
feat(firefox): apply emulation to all pages in the browser context (#931) 2020-02-11 18:52:01 -08:00
Dmitry Gozman f25a27a0a4
test: add a test for bounding box with page scale (#935)
Does not work on WebKit, because it uses device-independent pixels instead of css pixels for content quads.
2020-02-11 17:04:49 -08:00
Pavel Feldman 20e2bac857 test: fix flaky page event test 2020-02-11 15:19:43 -08:00
Pavel Feldman 53237009ad
feat($wait): make $wait a shortcut for waitForSelector (#932) 2020-02-11 14:51:09 -08:00
Joel Einbinder 6105d8a26a
fix(tests): fix test that was leaking a context (#933) 2020-02-11 14:15:30 -08:00
Pavel Feldman aae5fca237
feat(api): make browser.newPage own the created context (#930) 2020-02-11 12:06:58 -08:00
Dmitry Gozman c69dccf7c1
feat(click): use browser-provided scrollIntoViewIfNeeded (#893) 2020-02-11 10:30:09 -08:00
Pavel Feldman 72b9cf010e
feat(context): introduce BrowserContext close event (#918) 2020-02-11 10:27:19 -08:00
Meir Blachman 5fee93ae96
test: fix expect in jshandle spec (#927) 2020-02-11 09:26:23 -08:00
Joel Einbinder 251ad38824
fix(navigations): remove LifecycleWatcher, fix flakes (#882) 2020-02-10 18:35:47 -08:00
Joel Einbinder c03e8b7946
chore(tests): add types for tests (#915)
I enabled vscode autocomplete in our test files. Typechecking had too many errors to enable, but it caught some real bugs that I will fix in a follow up.

This patch contains:
* `test/types.d.ts` - d.ts file for our test runner.
* `test/tsconfig.json` - typescript project for our tests.
* JSDoc header in all specs to mark the describe as a TestSuite
* Drive-by fix of a launcher test that was using `if` instead of `it`
* Some drive-by fixes of unimpactful typos in tests.
2020-02-10 13:20:13 -08:00
Andrey Lushnikov 4fcc63f2e1 chore: remove usages of mime module from infrastructure
Follow-up to 4d84e35096
2020-02-10 11:26:08 -08:00
Pavel Feldman 84f5700294
feat(api): rename browserContext() to context() in the apis, remove url from newPage (#906) 2020-02-10 10:41:45 -08:00
Pavel Feldman 4d84e35096
fix(upload): detect mime type from file extension (#911) 2020-02-10 10:08:51 -08:00
Pavel Feldman 79b7a8491e
fix(screenshot): be careful w/ default viewport, extract common logic (#913)
Fixes #887.
2020-02-10 09:15:15 -08:00
Pavel Feldman 36344dee27
tests: consistently use platform constants (#899) 2020-02-07 14:44:05 -08:00
Pavel Feldman fe2431e34b
feat(webkit): roll webkit to r1137 (#884) 2020-02-06 21:06:55 -08:00
Dmitry Gozman fee83b17c9
fix(api): page.viewport -> page.viewportSize (#878)
We now only allow to resize the page, leaving isMobile and deviceScaleFactor as browser context options.
2020-02-06 19:02:55 -08:00
Dmitry Gozman c33a12d8f0
feat(firefox): ensure that new pages get browser context userAgent option (#872) 2020-02-06 19:01:03 -08:00
Pavel Feldman 99d06892c5
tests: explicitly close contexts for browser.newPage (#875) 2020-02-06 15:18:07 -08:00
Pavel Feldman a547aa7984
feat(connect): allow multiple webkit connections over web socket (#863) 2020-02-06 12:41:43 -08:00
Andrey Lushnikov f49d63ff0c test: remove fdescribe 2020-02-06 12:20:29 -08:00
Pavel Feldman 5152540f47
test(cookies): add more isolation tests (#869) 2020-02-06 09:24:10 -08:00
Dmitry Gozman 6318ba6e4a
feat(frame): introduce frame.frameElement (#856)
Fixes #839.
2020-02-05 17:20:23 -08:00
Pavel Feldman 55b6fe241e
feat(launch): introduce client, server & persistent launch modes (3) (#854) 2020-02-05 16:36:36 -08:00
Andrey Lushnikov a4c40fff82
test: make sure page.fill actually clears an input (#851) 2020-02-05 16:07:25 -08:00
Pavel Feldman a2ab645e63
feat(launch): introduce client, server & persistent launch modes (2) (#840) 2020-02-05 12:41:55 -08:00
Pavel Feldman 0518625dcc
feat(launch): introduce client, server & persistent launch modes (1) (#838) 2020-02-04 19:41:38 -08:00
Pavel Feldman bdf8e39786
feat(goto): assume http:// for localhost navigations (#825) 2020-02-04 19:39:52 -08:00
Dmitry Gozman 8f1df5e1e8
fix(chromium): pause workers on start to not miss any events (#832) 2020-02-04 19:36:46 -08:00
Dmitry Gozman 4b761f4485
test: expect current behavior for cross-frame js handles (#833) 2020-02-04 19:34:54 -08:00
Pavel Feldman e3e2da3186
feat(check): introduce page.check/uncheck (#826) 2020-02-04 14:39:10 -08:00
Pavel Feldman 05d4746eb5
feat(selectors): temporarily remove zs engine (#824) 2020-02-03 16:14:37 -08:00
Pavel Feldman 1059e22f9e
fix(fill): make fill work for input[type=number] (#819) 2020-02-03 15:50:45 -08:00
Andrey Lushnikov b82bc5fbd4
feat: treat selectors with leading '(//' as xpath (#821)
This starts treating the following selectors as xpath:
- `page.$('//div')`
- `page.$('(//div)[1]')`
- `page.$('((((//div))))[1]')`

(and generally, any number of leading openting parenthesis)

Fixes #817
2020-02-03 14:52:18 -08:00
Pavel Feldman 8028fb052a
feat(route): migrate from request interception w/ events to page.route (#809) 2020-02-03 14:23:24 -08:00
Yury Semikhatsky 25f2a32af3
feat: add Page.opener() to the API (#790)
Fixes #783
2020-01-31 18:38:45 -08:00
Darío Kondratiuk 0f305e05e9
test(cookies): Rename clearCookies describe (#791)
Tests in that describe are about clearCookies
2020-01-31 17:08:48 -08:00
Pavel Feldman ef1d2fb995
Revert "fix: move offline/cache/interception switches to BrowserContext (#748)" (#793)
This reverts commit 6faf74bc95.
2020-01-31 16:23:15 -08:00
Pavel Feldman 2bf88fd178
test: start adding capability smoke tests (#784) 2020-01-31 08:57:47 -08:00
Pavel Feldman 5cb19c6265
test: extract common headful tests (#785) 2020-01-31 08:54:11 -08:00
Joel Einbinder ca49d50b9c
test: disable firefox popup tests that rely on waitForLoadState (#768)
We have a race between opening a popup and calling waitForLoadState that sometimes causes waitForLoadState to timeout.
2020-01-30 14:53:38 -08:00
Joel Einbinder 2b231c9e1b
fix(test): unflake waitForSelector when browser closes test (#767)
The waitForSelector call might not have made it into the browser by the time we disconnect, resulting in a websocket error instead of a protocol error.
2020-01-30 14:19:30 -08:00
Joel Einbinder f4640d145f
Revert "tests(accessibility): Remove unused browser goldens (#758)" (#763)
Not dead code, this caused these tests to fail in firefox.
Reverts #758
2020-01-30 13:38:24 -08:00
Darío Kondratiuk d590ab93fa
tests(accessibility): Remove unused browser goldens (#758) 2020-01-30 12:07:08 -08:00
Yury Semikhatsky 603b9f54dd
fix: make contentFrame cross-frame handles test pass (#761) 2020-01-30 11:04:09 -08:00
Yury Semikhatsky eb568046eb
test: unflake owner frame test (#760) 2020-01-30 10:50:25 -08:00
Dmitry Gozman 0e6b44d337
feat(selectors): selectors.register accepts function (#753) 2020-01-29 15:13:43 -08:00
Yury Semikhatsky 6faf74bc95
fix: move offline/cache/interception switches to BrowserContext (#748) 2020-01-29 12:51:14 -08:00
Darío Kondratiuk a65bf4179f
test(browsercontext): cookies() is a BrowserContext function (#741) 2020-01-29 09:39:43 -08:00
Joel Einbinder b68a88a3fc
test: enable passing modifiers test (#733)
This test passes. Maybe at some point it failed on mac, but that has been fixed for a long time.
2020-01-28 18:19:59 -08:00
Andrey Lushnikov ce7c8d74b5
feat: introduce BrowserType.name() (#732)
This helps a lot to produce nice logging:

```js
const { chromium, webkit } = require('playwright');

(async () => {
  for (const launcher of [chromium, webkit]) {
    console.log(`Testing on ${launcher.name()}`);
    const browser = await launcher.launch();
    // ...
    await browser.close();
  }
})();
```
2020-01-28 18:09:07 -08:00
Joel Einbinder 184b25ff7b
chore: windows bots via github actions (#678)
Mac will come in a follow up!

As a drive-by, removed npm build everywhere, because npm install already runs build.
2020-01-28 18:04:51 -08:00
Joel Einbinder 4a3bd6008b
fix(test): fix race in confusing confuse with previous navigation test (#730) 2020-01-28 17:25:07 -08:00
Joel Einbinder 5e5d1933b7
test: don't ignore random arguments (#726)
This test was ignoring some very important arguments depending on the browser! The comment about `--enable-automation` was a lie. I changed it to ignore the userDataDir argument, which should be safe.
2020-01-28 15:03:10 -08:00
Pavel Feldman 09e97afd22
feat(wk,ff): amend method & postData upon continue (#703)
Fixes #668
2020-01-28 14:29:46 -08:00
Davy Duperron 62f4ed6b6a feat(unit): add click test on animated target (#655) 2020-01-28 13:26:26 -08:00
Dmitry Gozman c04ad140f3 feat(launcher): gracefully close browser on sigint (#650) 2020-01-28 13:07:53 -08:00
Dmitry Gozman 324874962c fix(webkit): make frames detect their initial load state (#690) 2020-01-28 13:05:38 -08:00
Yury Semikhatsky 38b5f76d6e fix(test): wait for load state before checking opener of popup (#714) 2020-01-28 11:27:14 -08:00
Dmitry Gozman 2bef4aea03
feat(api): introduce selectors.register method (#701) 2020-01-28 11:20:34 -08:00
Yury Semikhatsky 2ddc987854 fix(webkit): initialize popups on start (#693) 2020-01-28 11:07:35 -08:00
Andrey Lushnikov 54f442e0f4
fix: properly expose top-level devices (#698) 2020-01-27 17:21:39 -08:00
Dmitry Gozman 89b5d2f7be
fix(setContent): manually reset lifecycyle for all browsers at the right moment (#679) 2020-01-27 16:51:52 -08:00
Dmitry Gozman 541fa95ce4 fix(ownerFrame): correctly handle adopted node usecase (#677) 2020-01-27 11:43:43 -08:00
Pavel Feldman b4b7c5eeef
feat(webkit): enable user-data-dir tests for all platforms (#646)
Fixes #560
2020-01-24 17:42:24 -08:00
Yury Semikhatsky b64604c1ea
chore: replace pptr with pw (#643) 2020-01-24 16:15:41 -08:00
Dmitry Gozman be19ae5e67 feat(browserApp): kill and onclose (#641) 2020-01-24 15:58:04 -08:00
Dmitry Gozman f1d1dfb081 fix(webkit): rewrite global object retrieval errors (#640) 2020-01-24 15:56:41 -08:00
Dmitry Gozman 2b44d75eb6 test: move most launcher tests to common (#621) 2020-01-24 11:12:57 -08:00
Dmitry Gozman 060fbf7428 fix(workers): emit workerdestroyed event when clearing workers (#618) 2020-01-23 17:52:06 -08:00
Dmitry Gozman 056fbbd53e
fix(api): make pipe connection the default, expose webSocket launch option (#562) 2020-01-23 17:45:31 -08:00
Dmitry Gozman 866c60254b fix(firefox): disable ICC color correction based on OS display (#614)
This way screenshots will be consistent across host environments.
2020-01-23 15:44:31 -08:00
Dmitry Gozman c1cca19e90
test: extract tests for webkit provisional page (#609) 2020-01-23 15:32:56 -08:00
Yury Semikhatsky 044ebd7fd8 fix: delete contexts from the map on navigation (#602) 2020-01-23 14:58:30 -08:00
Dmitry Gozman ac2ba3cbd9
fix(api): BrowserServer -> BrowserApp, resuse it between browsers (#599) 2020-01-23 14:40:37 -08:00
Pavel Feldman b4209e9dc8
test: move user-data-dir tests into shared location (#603) 2020-01-23 12:18:41 -08:00
Dmitry Gozman a5019ea69a
fix(api): remove remoteAddress from api (#601) 2020-01-23 12:13:58 -08:00
Dmitry Gozman 23a668e3be
feat(firefox): support request interception (#571) 2020-01-23 10:38:28 -08:00
Dmitry Gozman 68d51a371e
test: add a test for usage after disconnecting (#595) 2020-01-23 10:36:13 -08:00
Dmitry Gozman fa2f321fdd
fix(api): remove BrowserServer.connect (#574) 2020-01-23 08:51:43 -08:00
Andrey Lushnikov 06e48f2294 test: skip failing wk test 2020-01-22 18:52:41 -08:00
Dmitry Gozman 3269358ac8
feat(webkit): covert pipe to websocket when asked (#570) 2020-01-22 17:42:10 -08:00
Pavel Feldman bb4ae87c61 feat(webkit): roll webkit to 1106 (#573) 2020-01-22 17:34:34 -08:00
Yury Semikhatsky 6308dbe01e fix(webkit): always push state changes to the provisional page (#564) 2020-01-22 14:17:44 -08:00
Pavel 1c8b421260 chore: remove web sockets for now, mute failing wpe tests 2020-01-21 18:33:19 -08:00
Joel Einbinder 612834b9e8 test: disable failing scrollIntoViewIfNeeded test for firefox (#546) 2020-01-21 12:01:39 -08:00
Pavel Feldman 80c3b46a54
feat(websockets): implement support for ws on cr/wk (#542) 2020-01-21 11:48:48 -08:00
Dmitry Gozman ddf47bc291 feat(worker): report workers network activity (#545) 2020-01-21 10:41:04 -08:00
Dmitry Gozman 894e91bb68 fix(api): remove $x form the api, $$ works equally good (#544) 2020-01-20 11:30:22 -08:00
Dmitry Gozman 6cf70e2e4c test(firefox): enable some passing tests (#536) 2020-01-17 17:51:48 -08:00
Dmitry Gozman d64c38b586 feat(firefox): support workers (#532) 2020-01-17 17:51:02 -08:00
Dmitry Gozman bb3f12245c feat(network): ignore favicon requests - these are too unpredictable (#533) 2020-01-17 17:14:39 -08:00
Yury Semikhatsky 879ce66f5e
test(webkit): unskip one more navigation test (#534) 2020-01-17 17:12:43 -08:00
Yury Semikhatsky f76db837c9 fix(webkit): make interception work with cross-process navigation (#529) 2020-01-17 16:48:50 -08:00
Yury Semikhatsky 44cbe00643
test(webkit): unskip passing test (#530) 2020-01-17 16:17:51 -08:00
Dmitry Gozman 82057ac610 test: make api coverage checker work (#517) 2020-01-16 17:46:50 -08:00
Dmitry Gozman 057e466a65 fix(api): remove network events for data: urls (#512) 2020-01-16 16:58:02 -08:00
Dmitry Gozman 447d76d6cd
fix(firefox): assorted fixes to evaluation and remote objects (#511) 2020-01-16 15:24:37 -08:00
Dmitry Gozman 21510a5b06
feat(firefox): support isolated worlds (#507) 2020-01-16 12:57:28 -08:00
Joel Einbinder a92bec13cb test: disable flaky redirect loop test (#496) 2020-01-15 22:05:27 -08:00
Pavel Feldman a71f31d07e
fix(wkwin): misc test fixes (#502) 2020-01-15 17:53:03 -08:00
Pavel Feldman 6f92d19cdd
test: rebaseline with win32 in mind (#499) 2020-01-15 13:40:44 -08:00
Joel Einbinder aaa1c9203e
feat(firefox&webkit): support root in accessibility.snapshot (#495)
This adds support for `root` in accessibility.snapshot
firefox role names are now normalized to aria roles where they match
webkit roledescriptions are less noisey on mac
webkit mac/linux results are further defined
interestingOnly tests are replaced by one that doesn't rely on undefined behavior
the main accessibility test was split up a bit for more refined testing.
2020-01-14 16:54:50 -08:00
Joel Einbinder 29c3a7f021 test: add a failing test for Page.waitForLoadState (#488) 2020-01-14 13:54:48 -08:00
Yury Semikhatsky 5fa39dde3f
fix(webkit): use cross-process loader ids (#486) 2020-01-14 11:46:08 -08:00
Dmitry Gozman 5b1aef4c20 api: remove BrowserFetcher from api, update docs (#487) 2020-01-14 10:07:26 -08:00
Yury Semikhatsky ff904d3a61
Revert "fix(webkit): use cross-process loader ids (#484)" (#485)
This reverts commit d341b43023.
2020-01-14 09:49:49 -08:00
Yury Semikhatsky d341b43023
fix(webkit): use cross-process loader ids (#484) 2020-01-14 09:48:36 -08:00
Dmitry Gozman 74b208cae5 feat(selectors): text=foo selector engine (#475) 2020-01-13 17:39:43 -08:00
Dmitry Gozman b388722777
chore: update top-level api (#479)
```
require('playwright').chromium.launch(...)
window.playwrightweb.chromium.connect(...)
```
2020-01-13 17:36:46 -08:00
Joel Einbinder 0ea6e19b09
fix(test): failing ci tests (#478)
disables some failing Firefox tests
Moves newContext error checking before the context is created, to not create zombie contexts
sets CI timeout to 30 seconds
waits for `exit` instead of `close` for processes
2020-01-13 17:16:05 -08:00
Dmitry Gozman 929b7d979b
test(selectors): should auto-detect css selector with attributes (#477) 2020-01-13 17:13:36 -08:00
Dmitry Gozman 8b09358a56
fix(screenshot): element screenshot should not throw when viewport is null (#472) 2020-01-13 16:29:08 -08:00
Dmitry Gozman a88d30140c fix(geolocation): improve geolocation validation (#471) 2020-01-13 15:39:13 -08:00
Dmitry Gozman 88a11a3fbd fix(getProperties): return empty map for non-objects (#470) 2020-01-13 15:36:22 -08:00
Andrey Lushnikov 98bf9ac1d5
fix(testrunner): return correct exit code (#474) 2020-01-13 15:30:16 -08:00
Dmitry Gozman a1d1f26fb7 chore: more strict type checking (#466) 2020-01-13 13:33:25 -08:00
Pavel Feldman d19f10ef42
fix(geolocation): use values from context options (#463) 2020-01-13 13:32:44 -08:00
Yury Semikhatsky 778ab3deff chore: replace CHROME with CHROMIUM (#465) 2020-01-13 10:13:28 -08:00
Pavel Feldman 00057df92b test: uncomment more webkit tests (#461) 2020-01-11 08:37:51 -08:00
Pavel Feldman 16cedfe9da
test: rebaseline mobile viewport screenshot (#462) 2020-01-10 22:34:17 -08:00
Pavel Feldman 69fe6ece43 test: mark web sdk tests as non-core 2020-01-10 21:54:42 -08:00
Dmitry Gozman 67e4214146 feat(navigation): early return when navigation was canceled by another one (#459)
Also added related interception tests.
2020-01-10 17:33:07 -08:00
Andrey Lushnikov 7a7ff9e994 Revert "Revert "feat(firefox): roll Firefox to r1011 (#452)""
This reverts commit a738af4603.
2020-01-11 02:32:28 +01:00
Dmitry Gozman 63f16a9ef8
fix(screenshot): provide nice error message during navigation (#456) 2020-01-10 17:25:28 -08:00
Dmitry Gozman c77fd5e6cb
feat(pw-web): generate playwright/web.js which can be used in the browser (#455) 2020-01-10 16:03:10 -08:00
Dmitry Gozman 15b05e43bc test(emulation): should update settings during navigation (#457) 2020-01-10 15:53:48 -08:00
Pavel Feldman a738af4603 Revert "feat(firefox): roll Firefox to r1011 (#452)"
This reverts commit c1f75f7833.
2020-01-10 12:17:34 -08:00
Andrey Lushnikov c1f75f7833 feat(firefox): roll Firefox to r1011 (#452) 2020-01-10 10:54:24 -08:00
Pavel 4bdbe81856 chore: shuffle screenshot tests 2020-01-09 17:45:30 -08:00
Pavel 896701b3e3 test: uncomment geolocation tests on WK 2020-01-09 17:40:50 -08:00
Pavel Feldman 4d2a503c44
feat(webkit): rebaseline Joel's pass all viewport tests PR (#440) 2020-01-09 17:06:06 -08:00
Pavel Feldman 63f208bafb test(screenshots): add a bunch of screenshot tests (#448) 2020-01-09 16:43:11 -08:00
Dmitry Gozman 987863cfb8
chore(webkit): remove WKPageProxySession, separate connection from browser session (#447) 2020-01-09 15:14:35 -08:00
Joel Einbinder d83d3c3851
feat(webkit): basic isMobile viewport support (#348) 2020-01-08 20:15:30 -08:00
Joel Einbinder f161a36a16 feat(webkit): roll webkit to 1076 (#431) 2020-01-08 15:34:35 -08:00
Yury Semikhatsky b6f1b17906
fix(webkit): do not fire FrameNavigated when receive resource tree (#432) 2020-01-08 15:32:13 -08:00
Dmitry Gozman 28bad69093
fix(server): tidy up BrowserServer.close methods (#426) 2020-01-08 13:55:38 -08:00
Yury Semikhatsky b654fd614d
test(webkit): enable Keyboard should work after a cross origin navigation (#428) 2020-01-08 12:28:00 -08:00
Yury Semikhatsky 86fc2699aa
test(webkit): enable click test that was fixed by moving input agent (#424) 2020-01-08 10:49:14 -08:00
Dmitry Gozman 8697929e39
chore: move webkit server code to src/server (#415) 2020-01-07 16:15:07 -08:00
Dmitry Gozman f15abadc9e chore: refactor CRBrowserServer (#408) 2020-01-07 14:13:55 -08:00
Pavel Feldman f75ac45c42
feat(workers): support workers in webkit (#400) 2020-01-07 12:59:01 -08:00
Dmitry Gozman 9c966c8b19
feat(pw-web): introduce platform.ts to absract between node and browser platforms (#392) 2020-01-07 11:55:24 -08:00
Arjun Attam 562e6f5fe1 chore(license): use Apache 2.0 (#389) 2020-01-06 18:22:35 -08:00
Pavel Feldman e826a4d3f4
fix: await the popup nav to make the test pass (#391) 2020-01-06 16:34:04 -08:00
Pavel Feldman 15ee47c7b2 feat(auth): roll webkit to 1063, make auth work for headful (#387) 2020-01-06 16:31:38 -08:00
Pavel Feldman a3e3ff73bd
test: fix the popup test on WebKit / GTK (#384) 2020-01-06 13:31:37 -08:00
Dmitry Gozman 491eeeef7e feat(scrollIntoView): expose scrollIntoViewIfNeeded in api (#382)
This also replaces isIntersectingViewport with visibleRatio for more flexibility.
2020-01-06 13:16:56 -08:00
Pavel Feldman 58b8e66df8
tests: make WebKit / GTK run all tests again (#383) 2020-01-06 11:48:11 -08:00
Pavel Feldman 38e79f12ec feat(media): remove media emulation from browser context options (#377) 2020-01-05 14:39:16 -08:00
Pavel Feldman 2f3593bd9a
test: uncomment / fix webkit tests that time out (#379) 2020-01-04 22:27:09 -08:00
Joel Einbinder 9fb6a68b25 fix(webkit): use protocol to serialize values instead of JSON (#373) 2020-01-03 15:39:01 -08:00
Dmitry Gozman 04bf728364 test: make network cache test pass on all browsers (#374) 2020-01-03 15:34:51 -08:00
Dmitry Gozman cf6f04893c
fix(browserContext): make a copy of passed options object (#370) 2020-01-03 14:42:18 -08:00
Pavel Feldman 62888d8543
revert(json): revert WK null-json mode, joel has a better fix (#372) 2020-01-03 14:06:55 -08:00
Dmitry Gozman 32edca7395 fix(networkidle): ignore favicons and keep track of requests (#368)
This counters Firefox not cancelling existing requests on navigation.
2020-01-03 12:59:27 -08:00
Dmitry Gozman 310d4b193b test: check that we inherit options from BrowserContext to the Page (#367) 2020-01-03 11:17:14 -08:00
Joel Einbinder 790e38a678 feat(webkit): accessibility (#350)
* move accessibility out of features

* feat(webkit): accessibility
2020-01-03 11:15:43 -08:00
Pavel Feldman fcd62b9611 feat(webkit): roll webkit to r1060, support target crash (#364) 2020-01-03 11:10:10 -08:00
Dmitry Gozman 6c1289626b
test: add a test for orientationchange event (#366) 2020-01-03 11:01:13 -08:00
Pavel Feldman 2d14d1ec1f feat(geo): enable geolocation overrides on WK (#361) 2020-01-03 10:14:50 -08:00
Pavel Feldman 0d9638fe20 feat(webkit): support pageerror event (#362) 2020-01-03 10:07:49 -08:00
Joel Einbinder 26538d6aec test: add mobile screenshot test, failing on webkit and firefox (#354) 2020-01-02 15:28:14 -08:00
Pavel Feldman 0fab90be79
feat(evaluate): survive null JSON in WK and FF (#352) 2020-01-02 15:06:28 -08:00
Arjun Attam 682e2be15f fix: allow email type in input for fill action (#353) 2020-01-02 14:10:01 -08:00
Pavel Feldman b64bd35c23
feat(evaluate): survive null JSON (#351) 2020-01-02 12:13:18 -08:00
Pavel Feldman 6a04e1f026 feat(offline+auth): enable those in webkit, make them a part of the core API (#346) 2019-12-30 23:09:54 +01:00
Pavel Feldman 654fa22cc7 feat(webkit): enable request interception (#343) 2019-12-30 23:05:28 +01:00
Yury Semikhatsky c540561503
test(wk): unskip passing test (#339) 2019-12-26 15:27:52 -08:00
Yury Semikhatsky f56ff07f19
fix(wk): support ElementHandle.ownerFrame (#338) 2019-12-26 14:05:46 -08:00
Yury Semikhatsky 3f0eaa2350
test(wk): unskip test that failed because bootstrap scripts did not survive PSON (#331) 2019-12-23 10:40:15 -08:00
Pavel Feldman 4638019902
feat(api): use good old inheritance instead of feature detection (#329) 2019-12-21 09:03:52 -08:00
Pavel Feldman 8f480a3987 docs: more docs update (#327) 2019-12-20 16:57:21 -08:00
Yury Semikhatsky 701b5db452 fix(wk): make evaluateOnNewDocument work with PSON (#326) 2019-12-20 16:16:32 -08:00
Dmitry Gozman 735d3eeed7
feat(navigation): introduce waitForNavigationIfNeeded (#310)
This one waits for current navigation to finish, matching by url if asked.
If there is no current navigation or current navigation/url does not match,
it waits for the next matching one.
2019-12-20 15:32:30 -08:00
Dmitry Gozman 56a48559c2
fix(setContent): call window.stop() before setting new content (#323)
This ensures that previous loading activity is suppressed and all network requests are canceled.
2019-12-20 15:30:12 -08:00
Pavel Feldman 9cfa404c87
feat: trim down url matching (#322) 2019-12-20 14:38:54 -08:00
Yury Semikhatsky 6b60b510b3 test: make fixture tests pass in all browsers (#321) 2019-12-20 14:10:13 -08:00
Pavel Feldman ad22a46fde
feat: move permissions back into the context (#320) 2019-12-20 13:07:14 -08:00
Joel Einbinder ce74a659e1 test: failing test for setting JSON equal to null (#314) 2019-12-19 17:25:09 -07:00
Andrey Lushnikov a7f3490e48 feat(testrunner): implement "dit" command (#312) 2019-12-19 16:47:35 -07:00
Dmitry Gozman 12ac458614 fix(elementhandle): contentFrame and ownerFrame work in various scenarios (#311)
Drive-by: use evaluateInUtility for various utility evals.
2019-12-19 15:19:22 -08:00
Dmitry Gozman 7e90292834 fix(networkidle): make it (almost) work with setContent (#307) 2019-12-19 15:07:57 -08:00
Pavel Feldman 331f0e603a feat: introduce BrowserServer (#308) 2019-12-19 14:51:49 -08:00
Dmitry Gozman b378bc7f6c
feature(evaluate): support cross-context element handles (#295) 2019-12-19 11:44:07 -08:00
Dmitry Gozman c172a7e7e0 feature: $wait similar to waitForFunction, but taking a selector (#303) 2019-12-18 18:11:02 -08:00
Pavel Feldman d570fc7809
feat: further strip the browser api (#304) 2019-12-18 18:07:11 -08:00
Dmitry Gozman 3669dad243 feat(urlmatch): support url matching in waitForNavigation (#300) 2019-12-18 18:03:02 -08:00
Joel Einbinder 1c2b6444e9 test(webkit): add tests for after cross origin navigations (#298) 2019-12-18 17:42:16 -08:00
Andrey Lushnikov 8cc682c7b8 feat(testrunner): allow focusing all tests in a file
With this change, exporting a "fdescribe" function from a file
will focus all tests inside the file.
2019-12-18 17:13:39 -08:00
Pavel Feldman 0e3328218d feat(context): remove the notion of incognito context (#299) 2019-12-18 16:44:02 -08:00
Yury Semikhatsky da051a72a8 fix: strip off hash from request urls (#297) 2019-12-18 16:27:20 -08:00
Pavel Feldman b5e9086576 chore: remove browser from the api (#296) 2019-12-18 16:23:05 -08:00
Yury Semikhatsky 1d4ebd37b1
tests(webkit): mark Page.navigate to invalid URL test as passing (#293) 2019-12-18 16:49:43 -07:00
Yury Semikhatsky ac2ea265fe
test(wk): unskip passing navigation test (#294) 2019-12-18 16:01:08 -07:00
Andrey Lushnikov 44b39bad33 fix(testrunner): show maximum 10 skipped tests in test report
This is to save some terminal screen real estate.

Drive-by: remove async test suites from test runner.
2019-12-18 14:33:46 -08:00
Dmitry Gozman 9afd35d3a1
feature(waitfor): waitFor visible or any by default (#284) 2019-12-18 14:28:16 -08:00
Dmitry Gozman 7750db97fe
api: remove ExecutionContext from api (#290)
In the current state, it is superseeded by Frame and JSHandle.
2019-12-18 13:51:45 -08:00
Yury Semikhatsky 58cd8210b0 test: disable new referrer test on FF 2019-12-18 13:36:35 -08:00
Yury Semikhatsky adf54ee6b3
tests: move ws-specific browser tests to corrsponding browser suites (#289) 2019-12-18 13:28:23 -07:00
Pavel Feldman 6d0dfd0abf
feat(context): start moving overrides to the context level 2019-12-18 12:23:33 -08:00
Andrey Lushnikov f56726759b
test: normalize browser executable path variables (#287) 2019-12-17 18:07:01 -08:00
Dmitry Gozman 0f8333ba89
feature(filechooser): move waitForFileChooser to common waitForEvent (#281) 2019-12-17 17:34:32 -08:00
Andrey Lushnikov 533d058ea6
fix(firefox): support late attachment and skip a few failing tests (#283) 2019-12-17 17:33:06 -08:00
Yury Semikhatsky 83833f61c1
feat(webkit): support referrer parameter in Page.navigate (#286)
* add test for reference-policy: no-referrer
2019-12-17 18:19:35 -07:00
Dmitry Gozman fd927000ea feature: update api around selectors (#280)
- Selector is again a string.
- Most methods taking selector also accept waitFor option.
- Available waitFor options are: 'visible', 'hidden', 'any' === true, false === undefined.
- waitForXPath is removed.
- waitForSelector is replaced by $(selector, { waitFor: true }).
2019-12-17 14:30:02 -08:00
Dmitry Gozman 75ae9bfeee
feature(waitFor): use URLMatch to match request/response, waitForEvent for generic (#278) 2019-12-17 14:00:39 -08:00
Andrey Lushnikov 0dafabb05e test: fix a few tests on firefox (#279) 2019-12-17 13:33:05 -07:00
Dmitry Gozman 24eb6d8671
chore: simplify extra http headers handling across browsers (#274) 2019-12-17 11:31:52 -08:00
Yury Semikhatsky e851a27350
feat(webkit): implement ElementHandle.contentFrame (#276) 2019-12-17 12:21:53 -07:00
Yury Semikhatsky 629c56b0ab test: make async stacks pass on WebKit (#277) 2019-12-17 11:04:04 -08:00
Dmitry Gozman 5a60a96410 chore: reuse navigation methods between browsers (#271) 2019-12-16 22:02:33 -08:00
Dmitry Gozman 48be99a56e feat(selectors): add id selectors (#270) 2019-12-16 20:49:18 -08:00
Yury Semikhatsky 8828228702 tests(webkit): unskip test that depends on frameStoppedLoading (#269) 2019-12-16 20:19:41 -08:00
Yury Semikhatsky 4a5929da55
fix(webkit): mark mixed content test as passing (#260)
* roll WebKit to 1042
2019-12-16 18:47:38 -07:00
Yury Semikhatsky 974f82073f feat(webkit): allow to run beforeunload when closing page (#264) 2019-12-16 17:33:36 -08:00
Yury Semikhatsky bfb8df29bb
feat(webkit): reload page after updating user agent (#268) 2019-12-16 18:29:40 -07:00
Dmitry Gozman f9f7d5c55a feature(navigation): implement networkilde0 and networkidle2 (#263) 2019-12-16 16:32:04 -08:00
Yury Semikhatsky a8f9c627f1 chore(tests): move ignoreHTTPSErrors interception test to featutes folder (#252) 2019-12-16 09:17:14 -08:00
Pavel Feldman df95b9ddb4 feat(waitFor): allow actions to wait for selector; make visible requirement default (#254) 2019-12-14 20:13:22 -07:00
Pavel Feldman a9568af21d
feat: create FF default profile prefs dynamically (#250) 2019-12-14 11:55:21 -08:00
Yury Semikhatsky 394c74fa5f chore(tests): move setCacheEnabled interception test to features (#253) 2019-12-14 11:54:52 -08:00
Dmitry Gozman 09bf6b1906 fix(navigation): expect navigation on navigation request (#248) 2019-12-14 08:20:51 -08:00
Yury Semikhatsky f539afa2a7
feat(webkit): support ignoreHTTPSErrors launcher option (#243)
Also roll webkit to 1036
2019-12-13 22:46:27 -07:00
Pavel Feldman 0b5c0a76ab feat(webkit): support emulating color scheme (#247) 2019-12-13 17:34:02 -08:00
Pavel c6afe0f155 test: enable Page.emulateMedia tests on WK 2019-12-13 16:37:49 -08:00
Dmitry Gozman dd2ce94de9
fix(navigation): waitForNavigation to pick up aborted navigation (#244) 2019-12-13 16:35:10 -08:00
Pavel cde81aaf5a fix: account for linux treatment of canceled requests 2019-12-13 14:06:00 -08:00
Dmitry Gozman 39fb556f27 fix(webkit): detect expected/aborted navigations based on network requests (#238) 2019-12-13 13:03:52 -08:00
Pavel Feldman bae8cd3fae
chrome: co-locate transport types (#236) 2019-12-12 21:30:49 -08:00
Pavel Feldman 5822de844a chore: rename common files to start with lower case 2019-12-12 20:55:29 -08:00
Pavel Feldman c7cf4886ea api: s/createIncognitoBrowserContext/newContext/ 2019-12-12 20:14:50 -08:00
Dmitry Gozman 90f0b8c2b0
fix(firefox): setContent to properly listen for lifecycle events (#219) 2019-12-12 20:11:33 -08:00
Andrey Lushnikov ee1f4784c6
feat(firefox): implement browser.firefox.wsEndpoint() (#233)
This lets us pass the fixtures test for browser shutdown.
2019-12-12 18:40:48 -08:00
Pavel 0675d8ec9a test: happy webkit test patch 2019-12-12 18:27:07 -08:00
Dmitry Gozman d378a8d3fc chore: reuse processLauncher between browsers (#231)
Drive-by: improve test runner to always exit and kill browsers
2019-12-12 17:52:13 -08:00
Dmitry Gozman 3b202fb4b8 fix(webkit): handle frameAttached event (#227) 2019-12-12 17:50:37 -08:00
Pavel Feldman 738502b0f0
fix(resize): wait for the ack when resizing gtk (#230) 2019-12-12 17:49:48 -08:00
Pavel Feldman ad067261fc test: removed accidental fit 2019-12-12 11:26:17 -08:00
Pavel Feldman 043e2f7513 test: uncomment utility world test 2019-12-12 10:36:11 -08:00
Pavel Feldman 58fd7c5c45 test: remove BigInt tests, no one uses BigInt yet (#224) 2019-12-12 10:38:34 -07:00
Dmitry Gozman 59b0900321
feat(selectors): introduce zs selector engine (#214) 2019-12-12 09:02:37 -08:00
Pavel Feldman 856787a8e6 feat(webkit): roll to 1029 (#222) 2019-12-12 08:59:33 -08:00
Dmitry Gozman 3c7181a545 fix(webkit): fix ordering of provisional messages relative to the rest (#225) 2019-12-12 09:59:08 -07:00
Pavel Feldman cca2659578 test: update console tests (#223) 2019-12-12 08:58:37 -08:00
Pavel Feldman 66e93ce2c0 test: rearrange / uncomment more tests 2019-12-11 22:52:14 -08:00
Pavel Feldman 995300b778 test: rearrange / uncomment some tests 2019-12-11 22:43:06 -08:00
Pavel Feldman 19cac9a0c1 test: rebaseline wk/mac network tests 2019-12-11 19:32:07 -08:00
Pavel Feldman 7c7c13e89d fix(webkit): fix a couple of navigation tests (#217) 2019-12-11 17:46:26 -08:00
Pavel Feldman 6440323003 fix(webkit): wait for main response on subresource-free goto (#216) 2019-12-11 16:19:37 -08:00
Joel Einbinder 78847c2f52 test(webkit): add failing test for navigating after disabling javascript (#215) 2019-12-11 16:04:02 -07:00
Pavel Feldman 4824a25cc6
fix(csp): fix some of the csp tests (#211) 2019-12-11 13:51:03 -08:00
Pavel Feldman 357e175964 fix(webkit): fullPage screenshot w/o viewport (#210) 2019-12-11 11:26:34 -08:00
Pavel Feldman 26e96bf591 test: follow up with chromiunm test fixes 2019-12-11 07:38:20 -08:00
Dmitry Gozman 57acdfd860 chore: reuse LifecycleWatcher between browsers (#208) 2019-12-11 07:17:32 -08:00
Pavel Feldman e42e361d20
feat(webkit): use new bypass csp method (#207) 2019-12-10 19:26:13 -08:00
Pavel Feldman 0353dbb3be test: rearrange remaining launcher tests 2019-12-10 19:23:21 -08:00
Joel Einbinder 02f2209b13 test(firefox): enable some tests that already firefox passes (#204) 2019-12-10 17:09:06 -08:00
Pavel Feldman 8c548ed9e9
feat(webkit): implement page.exposeFunction (#195) 2019-12-10 15:17:42 -08:00
Dmitry Gozman 5ffb710d7d
chore: reuse BrowserContext across browsers (#201) 2019-12-10 15:13:56 -08:00
Joel Einbinder 0af3b9dfc8 feat(webkit): page.on('popup') (#202) 2019-12-10 15:07:00 -08:00
Joel Einbinder c8067dbcde fix(test): Disable spellcheck in our textarea tests (#203) 2019-12-10 14:53:26 -08:00
Pavel Feldman fe6addc71a test: rearrange launcher tests more 2019-12-10 14:02:48 -08:00
Pavel Feldman f37d9bfe95 test: extract chromium-specific connect tests 2019-12-10 13:28:50 -08:00
Andrey Lushnikov 329b34e894
feat: implement mac keyboard (#197)
This list contains all of the default keyboard shortcuts for macos, and the Objective-C selector that they trigger on the [NSStandardKeyBindingResponding](https://developer.apple.com/documentation/appkit/nsstandardkeybindingresponding/3005237-moveleft?language=objc). We need these for basic keyboard functionality like ArrowUp and ArrowDown to work on WebKit for mac. For other browsers on mac, the same list can be used to enable better mac keyboard emulation.

The list was made by constructing NSEvents on a mac and seeing what selectors they triggered on an NSTextView. The conversion from NSEvents to DOM codes was done partially by hand as the code that does this conversion lives across many files in WebKit. There may be some errors or missing commands, but in general this should be a more faithful mac keyboard emulation than what we do in Chromium currently.

Notably absent from the list are Cut, Copy, Paste, Paste Special, Undo, and Redo. They are handled in a slightly different way.
2019-12-10 13:22:01 -08:00
Pavel Feldman c61c5b056f test: group interception tests in interception.spec 2019-12-10 13:11:20 -08:00
Pavel Feldman 44d6f608ef feat(webkit): use webkit worlds (#194) 2019-12-09 23:24:12 -08:00
Dmitry Gozman b4c89ca0f9
chore: unify frame lifecycle events between browsers (#172) 2019-12-09 16:34:42 -08:00
Dmitry Gozman e5a85e4e67
chore(webkit): migrate to common Page (#189) 2019-12-09 15:45:32 -08:00
Dmitry Gozman 640646b794
chore(firefox): migrate to common Page (#188) 2019-12-09 14:53:17 -08:00
Joel Einbinder e3f34bd69a
fix(fill): throw when the element isn't fillable (#160)
An element is fillable if its:
- In dom
- Not display:none or visibility:hidden
- textarea or input or contenteditable

if textarea or input it must also be
- not readOnly
- not disabled

#133
2019-12-09 14:51:19 -08:00
Pavel Feldman f5cd742b79
test: rebaseline some click tests (#179) 2019-12-08 17:17:49 -08:00
Pavel Feldman 51c975b098 chore: group more feature test files 2019-12-08 09:04:07 -08:00
Pavel 5274f2bd3c chore: only test request interception for Chrome & FF 2019-12-06 17:37:45 -08:00
Yury Semikhatsky 02e29219fd fix(webkit): make go back/forard return null on error (#171) 2019-12-06 16:38:23 -08:00
Pavel 0884e29695 chore: rearrange test spec files 2019-12-06 16:15:47 -08:00
Pavel b45ea22660 test: fix element.handle nested frames 2019-12-06 15:11:14 -08:00
Pavel bcb62de4b2 fix(test): make click tests pass everywhere 2019-12-06 14:48:41 -08:00
Pavel 349ce22565 lint: follow up with lints 2019-12-06 12:04:11 -08:00
Pavel Feldman bb1888c86e feat(screenshots): make them work everywhere (#164) 2019-12-06 11:33:24 -08:00
Joel Einbinder 1c9103e642 test(chrome): failing test for clicking when scroll-behavior is smooth (#136) 2019-12-05 17:58:19 -08:00
Andrey Lushnikov 929a5944bd test: fix chromium tests (#155)
3 chromium tests were failing on Linux.
2019-12-05 15:12:22 -07:00
Pavel Feldman 2d77760f01
chore: move tests around after targets extraction (#153) 2019-12-05 13:15:17 -08:00
Dmitry Gozman d4f0084f67
chore: move element coordinates handling to common (#139)
Browser now implement boundingBox(), contentQuads() and layoutViewport().
2019-12-05 09:54:50 -08:00
Yury Semikhatsky 25af050bd4 feat(webkit): add page back/forward commands (#144) 2019-12-05 08:32:52 -08:00
Pavel Feldman e1c4eaae28
chore: make targets chromium feature (#137) 2019-12-04 16:12:43 -08:00
Dmitry Gozman fc5898892b
feat(selectors): support optional "visible" property in all selectors (#129) 2019-12-04 13:11:10 -08:00
Joel Einbinder 492f539310
chore(firefox): lint against the juggler protocol (#94) 2019-12-04 10:33:29 -08:00
Yury Semikhatsky ba54ad46b3 feat(page): add Page.setJavaScriptEnabled for WebKit (#125) 2019-12-03 10:47:02 -08:00
Dmitry Gozman 6b3c2632e7
feat(selectors): support various selectors in waitFor methods (#122) 2019-12-03 10:43:13 -08:00
Dmitry Gozman bb1433a143
feat(selectors): support various kinds of selectors (#118)
This adds support for generic "engine=body [>> engine=body]*" selector syntax
and auto-detects simple css or xpath.
2019-12-02 17:33:44 -08:00
Pavel Feldman 505c9e3660 test: uncomment more cookies tests 2019-12-02 17:02:33 -08:00
Pavel Feldman 040f93faa2 feat(cookies): implement cookies across the board (#121) 2019-12-02 16:36:46 -08:00
Yury Semikhatsky 2ca2a4cb18 feat(launcher): throw on browser launch failure, default args (#119) 2019-12-02 16:17:53 -08:00
Dmitry Gozman b6c892842b
feat(screenshot): multiple element screenshots are now taken sequentially (#114)
This makes multiple element screenshots to not fight for the page viewport
by putting viewport manipulation under screenshot task queue.

Drive-by: encapsulated all screenshot logic in Screenshotter.
2019-12-02 10:53:58 -08:00
Pavel Feldman f28b31672e
test: fix file chooser tests (#110) 2019-11-27 16:18:04 -08:00
Pavel Feldman cf9c4d153a feat(webkit): implement file chooser interception (frontend) (#98) 2019-11-27 13:50:24 -08:00
Joel Einbinder 49f8963bf1
feat(webkit): dialogs (#75) 2019-11-27 12:24:52 -08:00
Pavel Feldman 72b1bb783b
feat(chromium): roll chromium to r719491, lint, test (#99) 2019-11-26 22:53:34 -08:00
Pavel Feldman cc41377fe2 chore: move emulateTimeZone and setGeolocation to Overrides (#92) 2019-11-26 15:13:49 -08:00
Pavel Feldman c7a07ea2a8 chore: move more unsupported apis to interception (#91) 2019-11-26 15:01:27 -08:00
Pavel Feldman 64d3e83ddf
chrome(filechooser): align file chooser implementations (#88) 2019-11-26 14:29:21 -08:00
Pavel Feldman a4e24c718b
feat(cookies): move cookie management to BrowserContext (#82) 2019-11-26 11:23:13 -08:00
Pavel Feldman 2eb653740a feat(headful): remove bringToFront (#84) 2019-11-26 11:00:54 -08:00
Pavel Feldman 991f4a9072
docs: fix the docs validator (#86) 2019-11-26 08:52:47 -08:00
Andrey Lushnikov d4d0654666
feat(firefox): roll Firefox to r1003 (#78) 2019-11-25 16:49:15 -08:00
Pavel Feldman 2e581f1625 feat(emulate): implement emulateMedia color scheme in FF (#71) 2019-11-25 15:00:04 -08:00
Pavel Feldman eaa5e93b8b feat(filechooser): supported file chooser in FF (#70) 2019-11-25 13:56:39 -08:00
Dmitry Gozman d5ad3960c3 chore: move Keyboard to common, with RawKeyboardImpl per vendor (#69) 2019-11-25 11:19:20 -08:00
Pavel Feldman 3190044c00 feat(firefox): implemented *.fill (#63) 2019-11-22 16:55:35 -08:00
Yury Semikhatsky ef847b1941 fix(page): support multiple bootstrap scripts (#59) 2019-11-22 16:25:36 -08:00
Pavel Feldman ef464e447f
feat(input): dblclick/trippleclick feature parity (#60) 2019-11-22 14:46:34 -08:00
Yury Semikhatsky 37a9c17d3e fix (#58) 2019-11-22 14:04:04 -08:00
Yury Semikhatsky ac01262c88
feat(page): support Page.evaluateOnNewDocument for WebKit (#55) 2019-11-22 13:14:07 -08:00
Dmitry Gozman e04910501b
feat(select): use ElementHandle instead of 'id=foo' when choosing options (#54) 2019-11-22 11:54:49 -08:00
Pavel Feldman 508c1960dd
chore: unify emulateMedia APIs (#53) 2019-11-22 11:24:56 -08:00
Dmitry Gozman 7783400156 feat(select): allow to select options by value/label/id/index (#46) 2019-11-21 21:19:21 -08:00
Pavel Feldman 1e91257d6e chore: group chromium-specific features (#45) 2019-11-21 16:54:10 -08:00
Pavel Feldman e3dcac1d46
chore: move interception API into features/ (#43) 2019-11-21 14:41:38 -08:00
Andrey Lushnikov 43836c9178 Revert "docs: show browser test stats in the readme (#24)"
This reverts test stats from the README.md
The stats now leave in a designated status page.
2019-11-21 13:00:48 -08:00
Joel Einbinder 92a6500b23 feat(webkit): page.fill and friends (#40) 2019-11-20 16:57:37 -08:00
Pavel Feldman e869b12f46 chore: remove touchscreen API (#41) 2019-11-20 16:55:02 -08:00
Joel Einbinder 206cf7b83f feat(webkit): pass all keyboard tests (#39)
Add `keyboard.sendCharacter` and fixes up all of the keyboard tests.

Drive-by to actually allow selectively installing browsers.
2019-11-20 16:39:12 -08:00
Pavel Feldman f9a89eb313 chore: split vendor APIs (#38) 2019-11-20 15:16:57 -08:00
Pavel Feldman 1fe1e150f3 chore: move geolocation into features/ (#37) 2019-11-20 14:18:05 -08:00
Pavel Feldman cf97e2c140 chore: remove handle.boxModel API (#36) 2019-11-20 14:15:19 -08:00
Pavel Feldman 653b4b9df3 chore: remove SecurityDetails API (#35) 2019-11-20 13:53:27 -08:00
Pavel Feldman a216063829 chore: remove Request.fromCache/ServiceWorker APIs (#34) 2019-11-20 11:57:21 -08:00
Pavel Feldman 76eb289f54
chore: move permissions API into features/ (#33)
- drive-by accessibility spec moved to a shared folder
2019-11-20 09:40:26 -08:00
Pavel Feldman 48a78b2c8a
chore: remove page.queryObjects API (#31) 2019-11-20 09:28:40 -08:00
Pavel Feldman 35e6d10517
chore: remove page.metrics API (#30) 2019-11-20 09:28:22 -08:00
Pavel Feldman 83ed65dce8 chore: move workers into features/ (#29) 2019-11-19 17:32:43 -08:00
Joel Einbinder 0a8d55d954 docs: show browser test stats in the readme (#24) 2019-11-19 16:30:24 -08:00
Pavel Feldman 85035fedea chore: move pdf, tracing, coverage, a11y into featuress/ (#28) 2019-11-19 16:29:28 -08:00
Pavel Feldman 6b5ab68e70 test: fix failing chromium tests (#26) 2019-11-19 13:51:09 -08:00
Pavel Feldman 4b13b5e3c6 chore: remove page.pdf API (#25) 2019-11-19 13:50:23 -08:00
Pavel Feldman 9ba375c063 Initial commit 2019-11-19 10:58:15 -08:00