Commit graph

276 commits

Author SHA1 Message Date
gboer 15bf6a0a1b
docs(class-page.md): Add additional clarification on requestFailed event (#6724) 2021-05-25 12:58:48 -07:00
Max Schmitt ba29e99ace
feat: added reduced motion media query emulation (#6646) 2021-05-22 01:56:09 +02:00
Andrey Lushnikov d1d49b3412
feat(chromium): roll Chromium to r884693 (#6686) 2021-05-21 11:05:44 -07:00
Joel Einbinder 447a0c4bb8
feat(types): export ScreenshotOptions (#6419) 2021-05-20 09:22:01 -07:00
Max Schmitt 202511d60a
docs: chromiumSandbox is by default false (#6662) 2021-05-20 00:16:55 +02:00
Joel Einbinder 754ee13c93
feat(electron): accept BrowserContextOptions in electron.launch (#6621) 2021-05-19 06:56:29 -07:00
Pavel Feldman bc18529191
docs(ff): temporarily remove ff-stable reference (#6585) 2021-05-14 12:03:38 -07:00
Sébastien Règne e87fbfcc1d
feat(download): add Page in Download (#6501) 2021-05-13 14:18:21 -07:00
Pavel Feldman bdb4aefc8f docs(tracing): remove the relative link 2021-05-13 11:24:53 -07:00
Vignesh Shanmugam 4b3e5e5c17
feat(network): expose network events via browser context (#6370)
- fix #6340
- Exposes all the network related events (request, response, requestfailed, requestfinished) through the browser context to allow for managing network activity even if the is any navigations through popups or to new tabs which could result in creation of multiple page objects.
2021-05-13 10:29:14 -07:00
Pavel Feldman 1a39843df5
docs: follow up on adding trace dir, unify launch options (#6545) 2021-05-12 16:16:36 -07:00
Pavel Feldman 21cb726b7d
chore(tracing): expose tracing api (#6523) 2021-05-12 12:21:54 -07:00
Max Schmitt 8af8b6340d
docs: add ref to waitForSelector from querySelector (#6514) 2021-05-12 08:07:49 +02:00
Sébastien Règne 33823a9143
docs(download): improve documentation (#6486) 2021-05-11 13:27:50 -07:00
Max Schmitt e0aaef5eab
docs: get rid of dollar sign prefix in code snippets (#6494) 2021-05-11 20:47:48 +02:00
Fili f1a888de02
feat: support Moto G4 device in emulated devices for performance testing (#5946)
Adding Moto G4 to deviceDescriptors.
2021-05-10 09:33:11 -07:00
Max Schmitt 5f7739962c
chore: get rid of trailing spaces in types.d.ts (#6481) 2021-05-10 16:26:11 +02:00
Michael Rienstra 8737207d5a
feat(devices): add more Android device descriptions (#6413)
Adds device descriptions for:
- Galaxy S8
- Galaxy S9+
- Galaxy Tab S4
- Pixel 3
- Pixel 4
These devices are regarded as worthy of targeting by BrowserStack.

Sources (both have identical data for these 5 devices):
1. https://github.com/aerokube/moon-deploy/blob/master/moon-local.yaml#L199
2. https://www.danhendricks.com/2018/04/adding-iphone-galaxy-chrome-mobile-emulated-devices/#heading_device_data
2021-05-05 14:02:28 -07:00
Darío Kondratiuk 9e36f5cc26
docs(consoleMessage): add missing console message comments (#6320)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-05-05 13:18:07 -07:00
Jason Harwig 42a5566653
fix(types): fix waitForSelector typing to not union null when appropriate (#6344)
Previously when options were defined, but no `state` key was provided,
the types would return null as an option. Even though the default state
is `visible` and shouldn't allow `null`.

Tests updated to fail appropriately and new tests added for this case.
2021-05-05 13:03:27 -07:00
Yury Semikhatsky 47cf9c3e8f
feat(chromium): bump to r878941 (#6216)
This roll was blocked by a few upstream bugs that were crashing Chromium on Windows.
- https://bugs.chromium.org/p/chromium/issues/detail?id=1198567#c33
- https://bugs.chromium.org/p/chromium/issues/detail?id=1200964
2021-05-05 09:47:34 -07:00
Dmitry Gozman 14ebcfdf0b
docs: update fill/selectOption docs to mention label retargeting (#6406) 2021-05-04 13:08:38 -07:00
Andrey Lushnikov 653d483ba8
docs: add firefox-stable channel documentation (#6328)
Fixes #5993
2021-05-03 16:52:33 -07:00
Pavel Feldman 1a859ebe68
chore(electron): fix node/browser race conditions, expose browser window asynchronously (#6381) 2021-05-02 22:45:06 -07:00
Max Schmitt 6da7e70232 chore: regenerate types after non-clean merge
Follow-up to #6379
2021-05-01 10:58:23 +02:00
Darío Kondratiuk dec973611c
docs(page): add missing docs on emulateMedia (#6322) 2021-04-29 21:08:30 -07:00
Max Schmitt 1c40c94ed7
chore: only throw the proxy on launch required on win/CR (#6350) 2021-04-30 00:02:48 +02:00
Joel Einbinder abb61456d1
docs(keyboard): clarify how page.type works for non-US characters (#6273) 2021-04-26 20:54:40 -07:00
Dmitry Gozman ce0331038b
docs: add route example with some logic (#6324) 2021-04-26 08:46:17 -07:00
Yury Semikhatsky fd31ea8b0d
feat: support extra http headers in browserType.connect() (#6301) 2021-04-23 14:52:27 -07:00
Dmitry Gozman ff147b0007
docs: update waitForRequest/Response snippets (#6294) 2021-04-23 08:53:25 -07:00
Max Schmitt 7053ac9097
chore(types): add channel to launchServer (#6256) 2021-04-21 21:23:08 +02:00
Dmitry Gozman 6bdc67ac6a
feat(actions): trial option that only performs the checks (#6246)
Available for check, click, dblclick, hover, tap, uncheck.
2021-04-21 12:22:19 -07:00
Dmitry Gozman 243ede5dfb
feat(waitForEvent): allow async predicate (#6201)
We await the predicate now. For synchronous predicates,
nothing should change becase the await will finish before
the next protocol message arrives (thanks to `makeWaitForNextTask`).
2021-04-19 10:32:51 -07:00
Dmitry Gozman e81a3c5901
api: add option position to check/uncheck (#6153)
Since check/uncheck does click under the hood, sometimes it might
need to click at a different position. One example would be a long
label that contains links inside, and clicking in the center happens
to hit the link instead of the label itself.
2021-04-12 12:41:25 -07:00
Ross Wollman bba7ca34c8
feat(chromium): roll to r869727 (#6170)
Fixes #5952
Fixes #6016
2021-04-09 20:57:41 -07:00
Dmitry Gozman db09275d89
docs: reject -> throw, fix small typos (#6152) 2021-04-08 16:42:45 -07:00
Joel Einbinder 63d0d466e3
feat(cdp): replace wsEndpoint with protocol neutral endpointURL (#6141) 2021-04-08 14:55:28 -07:00
Joel Einbinder 779355ad51
feat(types): make the template on BrowserType optional (#6142)
This makes it much nicer to use `BrowserType` because it no longer has a template.

Technically a breaking change because of the rare edge case where someone used their own non-browser type inside the template, but I don't consider that intended behavior and think this is fine.
2021-04-08 10:27:24 -07:00
Andrey Lushnikov 112ac2f98c
feat(chromium): roll Chromium to r867878 (#6065)
This roll required us pass a new flag - `--allow-pre-commit-input`. Otherwise, keyboard tests won't pass.

Co-authored-by: Joel Einbinder <joel.einbinder@gmail.com>
2021-04-06 15:56:41 -07:00
Dmitry Gozman f21f47889e
test: migrate more page tests to folio (#6062) 2021-04-04 19:32:14 -07:00
Pavel Feldman a7630c91d5
api: remove Chromium* classes (#6040) 2021-04-01 18:47:14 -07:00
Dmitry Gozman 9d9599c6a6
api(video): implement video.saveAs and video.delete (#6005)
These methods are safe to call while the page is still open, or when it is
already closed. Works in remotely connected browser as well.

Also makes video.path() to throw for remotely connected browser.

Under the hood migrated Download and Video to use the common Artifact object.
2021-03-31 10:38:05 -07:00
Yury Semikhatsky 587682e024
feat(chromium): bump to r865012 (#5963)
References #5858

Co-authored-by: Andrey Lushnikov <lushnikov@chromium.org>
2021-03-31 09:51:18 -07:00
Max Schmitt 26f9e29623
docs(route): add note about unroute (#6019) 2021-03-31 09:23:17 -07:00
Pavel Feldman 85ab1dc7a4
feat(waitForURL): add a new waitForURL api (#6010) 2021-03-30 21:51:22 -07:00
Pavel Feldman f1c0d09765
feat(size): emulate window.screen size (#5967) 2021-03-29 14:10:58 -07:00
Max Schmitt dfe07818e6
docs: fixed various typos (#5958) 2021-03-26 10:47:16 -07:00
Dmitry Gozman 12e00629e4
docs: update channels doc to mention manual installation (#5964) 2021-03-26 10:20:21 -07:00
Max Schmitt 601c09f7f1
docs(page): remove note that screenshot takes 1/6+s (#5945) 2021-03-24 20:02:14 -07:00
Pavel Feldman 543582b4ca
chore: expose channel name literals for types (#5922) 2021-03-23 13:21:03 -07:00
Pavel Feldman f70eaf4ff3
docs(android): android doc nits (#5924) 2021-03-23 13:20:41 -07:00
Pavel Feldman 1dd6bd3316
infra(channel): wire release channel to all tests (#5820) 2021-03-15 08:07:57 -07:00
Pavel Feldman a96d6a7dbb
feat: allow to pick stable channel (#5817) 2021-03-13 14:02:39 -08:00
Yury Semikhatsky aae8cc839a
docs: improve Download methods documentation (#5760) 2021-03-08 19:52:07 -08:00
Dmitry Gozman b3561e6c41
feat(chromium): bump to 857950 (#5742) 2021-03-05 18:09:38 -08:00
Yury Semikhatsky 2973eceaef
docs: string constant quoting (#5681) 2021-03-02 11:44:14 -08:00
Yury Semikhatsky f925a033e2
fix(docs): broken link to method (#5669) 2021-03-01 17:37:30 -08:00
Dmitry Gozman 96e099aca3
docs: use "argument: <type>" notation for events (#5626) 2021-02-25 22:22:47 -08:00
Yury Semikhatsky cb0a890a09
docs: java snippets for api classes (#5629) 2021-02-25 22:03:39 -08:00
Yury Semikhatsky f85deeba01
docs: no [File] links (#5601) 2021-02-24 14:29:14 -08:00
Joel Einbinder 180446d20f
fix(types): restore electron types (#5574) 2021-02-23 20:29:10 -08:00
Dmitry Gozman 5cb914b2fe
fix(types): do not use import('electron') (#5572) 2021-02-23 18:48:34 -08:00
Andrey Lushnikov eb9c8ce20c
feat(chromium): roll Chromium to Dev @ Feb 19, 2021 (#5536) 2021-02-22 11:17:55 -08:00
Yury Semikhatsky c3ee1cf9c7
chore(docs): use shared template for waitFroNavigation.url (#5520) 2021-02-22 10:23:02 -08:00
Anže Vodovnik 48f7a37259
docs(csharp): trimming to avoid broken refs (#5330) 2021-02-19 09:37:03 -08:00
Anže Vodovnik 9b73edfa19
chore(docs): fix invalid markdown reference (#5479) 2021-02-18 11:12:08 -08:00
Naresh cc749fe679
fix(android): added recent apps button (#5331) 2021-02-16 19:37:46 -08:00
Andrey Lushnikov b6bd7c0d6a
feat(chromium): roll Chromium to r851527 (#5434)
Fixes #5197
2021-02-16 14:21:47 -08:00
Dmitry Gozman 99f8e1cf63
docs: document Android and friends (#5415)
These are experimental, currently available through `_android`.
2021-02-11 10:31:57 -08:00
Andrey Lushnikov 6113d4d50d
feat(chromium): roll Chromium to r846621 (#5413) 2021-02-11 07:43:43 -08:00
Joel Einbinder dca70abbd3
feat(chromium): connect to a browser over cdp (#5207) 2021-02-10 14:00:02 -08:00
Dmitry Gozman c12374ea07
feat(docs): improve link validation (#5394) 2021-02-10 07:13:14 -08:00
Dmitry Gozman 78ab2955f3
fix(isVisible): do not wait for the selector to be resolved (#5393) 2021-02-10 07:12:43 -08:00
Yury Semikhatsky 3695dab1d5
docs: split RecordVideo object into dir and size options in java (#5389) 2021-02-09 16:44:50 -08:00
Joel Einbinder 7e757cd531
fix(types): regenerate types for latest doc changes (#5353) 2021-02-08 08:22:54 -08:00
Pavel Feldman fe2c529fda
docs: complete sentences with full stop (#5298) 2021-02-03 18:25:06 -08:00
Pavel Feldman 34adc28ed3
feat(pause): make page.pause public (#5288) 2021-02-03 16:01:51 -08:00
Dmitry Gozman 53ed35ef96
feat(dialogs): auto-dismiss dialogs when there are no listeners (#5269)
This makes dialogs disappear and prevents stalling.

Pros:
- No need to worry about dialogs for most users.
- Those that wait for a specific dialog still get to control it.

Cons:
- Those who use Playwright to show interactive browser will have
  to add an empty 'dialog' handler to prevent auto-dismiss.
  We do this in cli.
2021-02-03 10:34:45 -08:00
Yury Semikhatsky 4cd0d3e5da
docs: change StorageState type to string in java and C# (#5268) 2021-02-02 17:48:32 -08:00
Dmitry Gozman d96c547389
docs: note that user data dir is a parent of profile path (#5262)
Copied from https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#current-location
to help users that copy "Profile Path" to be used as user data dir.
2021-02-02 13:28:41 -08:00
Yury Semikhatsky cee394d6e0
docs: split ignoreDefaultArgs into 2 options for java (#5251) 2021-02-02 10:46:36 -08:00
Pavel Feldman 1db5ef24a8
docs: document electron api (#5229) 2021-02-01 11:43:26 -08:00
Anže Vodovnik dbcdf9dcd7
chore(docs): aliases for dotnet/chsarp docs. (#5162)
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2021-01-29 11:08:22 -08:00
Yury Semikhatsky 21041bc331
docs: support argument overrides (#5200) 2021-01-28 17:51:41 -08:00
Pavel Feldman ff6b2b1dd4
chore: make emulate media params be options (#5172) 2021-01-27 14:19:37 -08:00
Dmitry Gozman d78d337e29
feat(fill): make fill work when targeting elements inside the label (#5143) 2021-01-25 13:40:19 -08:00
Dmitry Gozman beed9a79a3
feat(chromium): bump to 845618 (#5138) 2021-01-25 07:45:21 -08:00
Yury Semikhatsky a4eb121399
fix: add parameter to close/crash/disconnected etc events (#5098) 2021-01-22 09:58:31 -08:00
Pavel Feldman 8f06761ba1
docs: link to the new docs from source (#5092) 2021-01-21 14:35:20 -08:00
Pavel Feldman f10f170946
docs: add file chooser example, remove links to js samples (#5054) 2021-01-20 08:12:39 -08:00
Yury Semikhatsky 615954b285
fix(dom): make selectOption wait for options (#5036) 2021-01-19 11:27:05 -08:00
Dmitry Gozman 0a7b917ee3
feat(chromium): bump to 844399 (#5044) 2021-01-17 17:28:06 -08:00
Pavel Feldman 41e394bc22
docs: allow overriding return types (#5031) 2021-01-15 16:01:41 -08:00
Pavel Feldman 7701176b0a
docs: allow lang-specific sh snippets (#5024) 2021-01-14 18:19:02 -08:00
Dmitry Gozman e85f278869
docs: more python docs and snippets (#5021) 2021-01-14 15:01:39 -08:00
Pavel Feldman 1648d23551
docs: add python snippets for api classes (follow up) (#5018) 2021-01-14 11:09:44 -08:00
Pavel Feldman 8354a91d0e
docs: add python snippets for api classes (#5011) 2021-01-14 07:48:56 -08:00
Pavel Feldman 5408e26e02
docs: add python snippets for class Page (#5010) 2021-01-13 21:03:35 -08:00
Dmitry Gozman e3ebba5573
chore: cleanup code that is not used by cli anymore (#5005) 2021-01-13 17:02:53 -08:00
Joel Einbinder decf373c81
fix(electron): return a ChromiumBrowserContext for electron (#4913) 2021-01-13 12:08:14 -08:00
Yury Semikhatsky df53cb2f83
docs: fix inline code quoting (#4992) 2021-01-13 08:56:57 -08:00
Pavel Feldman cac119f3bf
docs: python api review (#4986) 2021-01-12 12:14:27 -08:00
Pavel Feldman 4dbbb47583
docs: document Python's expect_event methods (#4963) 2021-01-10 21:00:52 -08:00
Pavel Feldman e67d89747a
chore: update docs to cover python specifics (#4960) 2021-01-10 18:18:35 -08:00
Dmitry Gozman 5a2cfdbd47
api: add isChecked method (#4953)
This adds `{Page,Frame}.isChecked(selector)` and `ElementHandle.isChecked()` methods.

Useful to do assertions in tests:
```js
await page.click('text="Add TODO"');
expect(await page.isChecked('.item-done')).toBe(false);
```
2021-01-08 17:36:17 -08:00
Pavel Feldman b7e0b1b393
docs: annotate evaluate(pageFunction) js-specific (#4954) 2021-01-08 16:17:54 -08:00
Dmitry Gozman 3f904056ee
api: add isVisible, isHidden, isEnabled, isDisabled and isEditable (#4915)
These methods are useful for verification in tests, e.g.
```js
expect(await page.isEnabled(':text("Remove All")')).toBe(false);
await page.click(':text("Add Item")');
expect(await page.isVisible('.item:text("new item")')).toBe(true);
expect(await page.isEnabled(':text("Remove All")')).toBe(true);
```
2021-01-08 12:27:54 -08:00
Dmitry Gozman d08cbc33a7
docs: brush up selector docs (#4939)
docs: brush up selector docs

- Remove duplication
- Move extensions block to ChromiumBrowser
- Remove accidental ":xpath" extension from css selectors
- Document :has and :is extensions
2021-01-08 10:59:24 -08:00
Pavel Feldman 54c06a1b45
chore: mark methods as js-only, add python-specific methods (#4938) 2021-01-07 16:12:25 -08:00
Pavel Feldman bdf12e32e4
docs: split api-body into classes (#4931) 2021-01-07 11:46:05 -08:00
Pavel Feldman 4cd989c653
docs: introduce deprecation annotation and any type (#4930) 2021-01-07 11:11:40 -08:00
Pavel Feldman 913f85249f
docs: make all links relative (#4926) 2021-01-06 20:02:51 -08:00
Yury Semikhatsky 0f8d7ec0a6
docs: improve waitForElementState documentation (#4883) 2021-01-05 10:56:02 -08:00
Pavel Feldman 31ffeb32e3
doc: further align docs w/ playwright.dev (2) (#4871) 2021-01-04 13:50:29 -08:00
Pavel Feldman e0e836cb6e
doc: split classes into files (#4864) 2021-01-01 15:17:27 -08:00
Pavel Feldman ba291372e7
docs: generate all docs off docs-src (#4858) 2020-12-30 18:04:51 -08:00
Pavel Feldman 9817d1095a
doc: generator code health (3) (#4850) 2020-12-29 12:12:46 -08:00
Dmitry Gozman 94077e0e74
chore: remove JS types checker, rely on typescript (#4831)
chore: remove JS types checker, rely on typescript

We keep checking that all methods are documented, and no extra methods
are documented, but rely on typescript for everything else.
2020-12-28 10:54:47 -08:00
Pavel Feldman a446792c18
docs: generate api.md off documentation model (#4832) 2020-12-28 07:03:09 -08:00
Dmitry Gozman 905f28c339
feat(types): simplify android and electron types (#4829)
These now follow the scheme for regular types.
2020-12-26 20:25:18 -08:00
Dmitry Gozman 34c1b338be
feat(types): make our client classes implement public types (#4817)
This patch:
- introduces non-exported but used in api/impl struct types (e.g. Point);
- makes all client classes implement respective public api interface.

Pros:
- Typescript is now responsible for type checking.
  We can remove our doclint checker (not removed yet).
- Electron and Android types can be defined in the same way
  (this is not implemented yet).
- We can move most of the type structs like Point to the public api
  and make some of them available.

Cons:
- Any cons?
2020-12-26 17:05:57 -08:00
Pavel Feldman 15cdfd1cc1
chore: generate types, api.json off md rather than html (#4825) 2020-12-26 14:31:41 -08:00
Dmitry Gozman 9dd982c508
chore: commit generated types to the repository (#4826)
Also check them during `npm run lint` and regenerate during `npm run watch`.
2020-12-26 13:52:05 -08:00
Pavel Feldman 05278b86fc
chore: remove committed types.d.ts - we are still generating it at build time (#4271) 2020-10-28 10:54:34 -07:00
Pavel Feldman be8428475d
feat(websocket): implement Web Sockets for Chromium & WebKit (#4234) 2020-10-26 22:20:43 -07:00