Commit graph

1166 commits

Author SHA1 Message Date
Yury Semikhatsky 60e9216ebb
docs: change page error type to string (#5412) 2021-02-10 16:12:04 -08:00
Joel Einbinder dca70abbd3
feat(chromium): connect to a browser over cdp (#5207) 2021-02-10 14:00:02 -08:00
Yury Semikhatsky 7933cfc7df
docs: inline Location methods into ConsoleMessage in java (#5402) 2021-02-10 12:54:44 -08:00
Yury Semikhatsky 90dbe35df0
docs: exclude recordHar field from java (#5401) 2021-02-10 11:41:55 -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
Dmitry Gozman 4d4efccb3e
docs: add release notes doc (#5391) 2021-02-09 21:44:16 -08:00
Yury Semikhatsky 716bd4211d
docs: spread RecordHar options in java (#5390) 2021-02-09 17:33:28 -08:00
Yury Semikhatsky 152701a273
docs: rename viewport option to viewportSize in java, C# (#5383) 2021-02-09 16:50:32 -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
Yury Semikhatsky adeb2348cf
docs: change WebSocket.frame* event type to WebSocketFrame in java (#5384) 2021-02-09 12:11:48 -08:00
Dmitry Gozman b50c363bba
docs(selectors): add quick guide section (#5346) 2021-02-08 19:51:11 -08:00
Yury Semikhatsky ef9995e694
docs: make pdf options strings in java and C# (#5369) 2021-02-08 18:07:27 -08:00
Yury Semikhatsky 4bfdaa384b
docs: fix playwright.dev generation error (#5360) 2021-02-08 12:27:17 -08:00
Yury Semikhatsky f35acc258b
docs: improve enum naming (#5359) 2021-02-08 11:58:25 -08:00
Arjun Attam 48a295dcf7
docs(api): stock browsers for media codecs (#5352)
* docs(api): stock browsers for media codecs

* Update docs/src/api/class-browsertype.md

Co-authored-by: Max Schmitt <max@schmitt.mx>

* Update docs/src/api/class-browsertype.md

Co-authored-by: Max Schmitt <max@schmitt.mx>

Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-02-08 18:50:11 +05:30
Dmitry Gozman f094f65ef3
docs: add section for custom setup codegen (#5339) 2021-02-06 14:57:01 -08:00
Yury Semikhatsky a1b3164864
docs: fix nested union handling (#5341) 2021-02-05 16:32:13 -08:00
Yury Semikhatsky d3cc1d7648
docs: add name for SameSiteEnum (#5340) 2021-02-05 16:13:48 -08:00
Yury Semikhatsky 4b74f5693c
docs: add enum aliases (#5335) 2021-02-05 15:28:48 -08:00
Yury Semikhatsky 494f0f63cc
docs: update route callback type for java (#5324) 2021-02-05 09:39:03 -08:00
Yury Semikhatsky 28e5975772
docs: define java specific waitFor* methods (#5315) 2021-02-04 21:15:14 -08:00
Anže Vodovnik ff06399afd
docs(csharp): events convention based naming fix for csharp (#5238)
* docs(gen): Updating events names to camelCase.
* docs(gen): updating generator to match new assumption for event names
* docs(gen): renaming references to events
2021-02-04 19:34:09 +01:00
Pavel Feldman fe2c529fda
docs: complete sentences with full stop (#5298) 2021-02-03 18:25:06 -08:00
Pavel Feldman 9841f6dbcb
chore: remove the 1.8.0a1 mentions (#5297) 2021-02-03 18:10:55 -08:00
Pavel Feldman 847bea2f83
chore: remove force_expr parameter from python api (#5295) 2021-02-03 16:39:08 -08:00
Pavel Feldman 34adc28ed3
feat(pause): make page.pause public (#5288) 2021-02-03 16:01:51 -08:00
Yury Semikhatsky c0480e5905
docs: skip Respone.json and Request.postDataJSON in Java (#5292) 2021-02-03 15:02:22 -08:00
Yury Semikhatsky 1c65b592d0
docs: use separate options for string and buffer body (#5291) 2021-02-03 14:56:17 -08:00
Yury Semikhatsky 080a9529b3
docs: rename Route.continue_ to Route.resume in java and C# (#5290) 2021-02-03 13:40:58 -08:00
Yury Semikhatsky 6c44a781c7
docs: make Request.failure return string by default (#5289) 2021-02-03 13:33:46 -08:00
Yury Semikhatsky a8425d33dd
docs: change Accessibility.snapshot type to string in java and c# (#5287) 2021-02-03 12:23:02 -08:00
Yury Semikhatsky eee2d02290
docs: change Accessibility.snapshot type to string in java and c# (#5286) 2021-02-03 12:19:25 -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 e0f41bf1fd
docs: change default return type of Response.finished to string (#5261) 2021-02-02 12:18:05 -08:00
Yury Semikhatsky c51a1f96e5
docs: update type of env in the remaining places (#5254) 2021-02-02 10:57:22 -08:00
Yury Semikhatsky cee394d6e0
docs: split ignoreDefaultArgs into 2 options for java (#5251) 2021-02-02 10:46:36 -08:00
Yury Semikhatsky 5564b203d9
docs: mark ChromiumBrowserContext as js and python specific (#5255) 2021-02-02 10:21:27 -08:00
Yury Semikhatsky 198e403c14
docs: add missing java.md (#5245) 2021-02-01 12:05:01 -08:00
Pavel Feldman e0e38706e4 docs: fix Python snippet casing (2) 2021-02-01 11:47:03 -08:00
Pavel Feldman 174b6aa2da
docs: fix Python snippet casing (#5244) 2021-02-01 11:44:39 -08:00
Pavel Feldman 1db5ef24a8
docs: document electron api (#5229) 2021-02-01 11:43:26 -08:00
Yury Semikhatsky e71ef7949b
docs: add java traits to some methods (#5222) (#5243) 2021-02-01 11:13:13 -08:00
Pavel Feldman 82bb92f103 Revert "docs: add java traits to some methods (#5222)"
Breaks playwright.dev
2021-01-30 22:15:56 -08:00
Yury Semikhatsky 9c4668685d
docs: add java traits to some methods (#5222) 2021-01-29 19:15:25 -08:00
Yury Semikhatsky a1d875ed97
docs: make inline refs us parameter name instead of its alias (#5219) 2021-01-29 16:02:17 -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 8581e3e950
fix(docs): a couple of broken links (#5211) 2021-01-28 15:15:29 -08:00
Pavel Feldman ff6b2b1dd4
chore: make emulate media params be options (#5172) 2021-01-27 14:19:37 -08:00
Pavel Feldman 35baf335d8 Revert "docs: update langs fields to include java (#5161)"
iThis broke Python docs.
2021-01-27 11:31:34 -08:00
Yury Semikhatsky d0ab0bd8f2
docs: update langs fields to include java (#5161) 2021-01-27 11:11:05 -08:00
Yury Semikhatsky 22fb7448c3
docs: share proxy documentation, exclude cdp session from java (#5150) 2021-01-25 16:53:47 -08:00
Dmitry Gozman 894abbfe28
feat(selectors): has-text pseudo-class (#5120)
This pseudo-class matches approximately when
`element.textContent.includes(textToSearchFor)`.
2021-01-25 14:19:07 -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
Yury Semikhatsky a4eb121399
fix: add parameter to close/crash/disconnected etc events (#5098) 2021-01-22 09:58:31 -08:00
Pavel Feldman dcf041a266
docs: update ci docs to better help Python users (#5095) 2021-01-21 16:41:42 -08:00
Dmitry Gozman 7a4b94e66c
feat(selectors): nth-match selector (#5081)
Introduces :nth-match(ul > li, 3) css extension, with one-based index.
2021-01-21 16:39:49 -08:00
Pavel Feldman 8f06761ba1
docs: link to the new docs from source (#5092) 2021-01-21 14:35:20 -08:00
Arjun Attam 043ed975c1
docs: update limitations to reflect java bindings (#5086) 2021-01-21 18:42:21 +05:30
Pavel Feldman 45c33ae02f
docs: fix some 1.8 docs nits (#5078) 2021-01-20 16:06:26 -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 19acf998da
docs: minor updates to selectors.md (#5055) 2021-01-19 10:48:18 -08:00
Dmitry Gozman 0586c2554f feat(text selector): normalize whitespace for quoted match (#5049)
This changes quoted text selector like `text="Foo Bar"` to perform
normalized whitespace match.

Most of the time users want to match some string visible on the page,
and that always means normalized whitespace.

We keep the case sensitivity and full-string vs substring difference
between quoted and unquoted matches.
2021-01-19 09:30:34 -08:00
Pavel Feldman 9e3bd78649
docs: update selectors doc to be more like a guide (#5048) 2021-01-18 20:59:16 -08:00
Pavel Feldman 01fb3a6045
docs: extract handles, screenshots, videos docs (#5045) 2021-01-17 21:09:40 -08:00
Dmitry Gozman 17e953c2d8
chore: make generate_types not depend on the source (#5040)
The only dependency is a list of devices that we
can turn into a js file.
2021-01-17 12:09:20 -08:00
Pavel Feldman 1fc02e8823
docs: add dialogs and downloads docs (#5042) 2021-01-16 14:37:13 -08:00
Dmitry Gozman 2db02c9a05
docs(python): update installation docs (#5039) 2021-01-16 06:42:40 -08:00
Pavel Feldman e67d563798
docs: don't use lang suffix in the intro url (#5035) 2021-01-15 17:59:19 -08:00
Pavel Feldman 41e394bc22
docs: allow overriding return types (#5031) 2021-01-15 16:01:41 -08:00
Pavel Feldman 6e94c11034
docs: prepare docs for tabbed snippets (#5026) 2021-01-15 12:30:10 -08:00
Pavel Feldman 56ba0b3cd9
docs: brush up some python docs (#5027) 2021-01-15 09:12:47 -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 5dcb7bb290
docs: declare expect_navigation as returning Response (#5020) 2021-01-14 14:40:19 -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
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
Dmitry Gozman d62b661cfa
docs: rename proximity selectors to position selectors (#4975) 2021-01-11 18:25:41 -08:00
Pavel Feldman cb6e4a6657
chore: update snippets in python docs (#4976) 2021-01-11 17:04:24 -08:00
Pavel Feldman 7a8214cd95
chore: prepare non-api docs for non-js variants (#4969) 2021-01-11 09:34:49 -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 3b617b3709
docs: validate member links (#4955) 2021-01-08 16:36:52 -08:00
Pavel Feldman b7e0b1b393
docs: annotate evaluate(pageFunction) js-specific (#4954) 2021-01-08 16:17:54 -08:00
Pavel Feldman 114d586f07
chore: add python aliases (#4949) 2021-01-08 15:00:14 -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 498f9a52c6
docs: update authentication guide to use storageState() api (#4948) 2021-01-08 12:24:10 -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 97de9209a6
docs: move links into playwright.dev (#4947) 2021-01-08 09:12:54 -08:00
Max Schmitt 77bfcd2c74
chore: add some Python language snippets (#4933) 2021-01-08 08:39:33 -08:00
Ali Naqvi 07cb5f71e3
docs: Added Crystal port to showcase (#4945) 2021-01-08 06:04:39 -08:00
Dmitry Gozman 2072c61461
docs: add Java to the list of language ports (#4940) 2021-01-08 06:02:54 -08:00
Pavel Feldman 15c0a29526
docs: split nodejs and python links (#4942) 2021-01-07 23:37:53 -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 e56832b646
chore: language-specific members api (#4936) 2021-01-07 15:00:04 -08:00
Dmitry Gozman 8d649949c0
docs: move Go port to showcase (#4934)
playwright-go is an unofficial port, so we put it to a new section in showcase.
2021-01-07 14:54:09 -08:00
Dmitry Gozman eb9ea20511
feat(selectors): proximity selectors (#4923) 2021-01-07 14:12:59 -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
Pavel Feldman 2311c282d6
docs: pref docs to be language-specific (#4916) 2021-01-06 11:59:29 -08:00
Pavel Feldman b6cd385a67
docs: mark some paths as such (#4896) 2021-01-05 17:05:43 -08:00
Dmitry Gozman b00559bd53
docs: add save/load storage to cli docs (#4899) 2021-01-05 13:40:42 -08:00
Dmitry Gozman 35ecf69dd2
chore: fix lint (#4898) 2021-01-05 13:24:22 -08:00
Yury Semikhatsky 0f8d7ec0a6
docs: improve waitForElementState documentation (#4883) 2021-01-05 10:56:02 -08:00
Pavel Feldman 4996eacd5b
docs: split numbers into integers and floats (#4887) 2021-01-05 09:42:49 -08:00
Pavel Feldman 80f8a0fdf5
doc: further align docs w/ playwright.dev (3) (#4884) 2021-01-04 17:59:23 -08:00
Pavel Feldman 31ffeb32e3
doc: further align docs w/ playwright.dev (2) (#4871) 2021-01-04 13:50:29 -08:00
Pavel Feldman ae935a43d9
doc: further align docs w/ playwright.dev (#4866) 2021-01-03 08:47: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 a5bd415edc
doc: generate class toc as a part of the api generation (#4852) 2020-12-29 17:35:01 -08:00
Pavel Feldman 722db85e1c
doc: generator code health (2) (#4843) 2020-12-28 23:42:51 -08:00
Dmitry Gozman 7f8717f139
feat(cli): add docs (#4837)
feat(cli): add docs
2020-12-28 17:38:44 -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
Pavel Feldman 2cb5770183
docs: move playwright module into api-body.md (#4827) 2020-12-26 15:33:29 -08:00
Pavel Feldman 15cdfd1cc1
chore: generate types, api.json off md rather than html (#4825) 2020-12-26 14:31:41 -08:00
Pavel Feldman 277d255fc3
chore: brush up md processing (#4819) 2020-12-23 19:35:43 -08:00
Dmitry Gozman f709e2300c
feat(cli): bring selector generator into playwright (#4795)
Also remove unused `SelectorEngine.create` function and add tests.
2020-12-23 12:44:47 -08:00
Pavel Feldman 2e220df7ac
docs: explicitly annotate methods and parameters (#4771) 2020-12-18 15:31:34 -08:00
Pavel Feldman d498b45005
docs: remove mentions of nodejs, promises and resolves (#4768) 2020-12-18 12:28:09 -08:00
Dmitry Gozman 355a58e616
feat(storage): accept path in save/load storage apis (#4714)
Also make Firefox accept `expires: -1` cookies.
2020-12-14 16:03:52 -08:00
Yury Semikhatsky 0b8f34e726
docs: rename aggregate parameter objects to params (#4715) 2020-12-14 15:27:02 -08:00
Andrey Lushnikov c5bb08c5f2
docs: remove outdated troubleshooting (#4706)
Most of the troubleshooting.md doc is not relevant any more:
- dependencies are maintained and helped with by launch doctor
- sandbox is disabled in Chromium by default

References #4683
2020-12-14 08:16:36 -08:00
Andrey Lushnikov 8d574a76bf
docs: update docker readme
References #4683
2020-12-14 08:11:05 -08:00
Pavel Feldman f20518f252
fix(har): do not complain about a lot of listeners (#4675) 2020-12-11 23:15:36 -08:00
Dmitry Gozman c8e9b0542b
feat(selectors): disable proximity selectors (#4659)
These are not ready for prime time yet.
2020-12-10 10:04:10 -08:00
Dmitry Gozman b67e022111
feat(selectors): update new text selector (#4654)
We now default to `text` that does substring case-insensitive match
with normalized whitespace. `text-is` matches the whole string.
`matches-text` is renamed to `text-matches`.
2020-12-09 16:05:51 -08:00
Dmitry Gozman ab44d682ca
feat(selectors): remove index for now, add documentation (#4640) 2020-12-09 13:08:37 -08:00
Yury Semikhatsky 6c4d3b86f6
chore(docker): put browser deps instructions first (#4637) 2020-12-08 10:36:37 -08:00
Max Schmitt 71b7b488f4
chore: use Node.js 14 (new LTS) in Docker image (#4262)
Discussion / background: https://github.com/microsoft/playwright/pull/3642#issuecomment-686640755

Closes #4254
2020-12-06 18:24:27 -08:00
Pavel Feldman a3a31bc837
doc: add the mobile.md doc (#4612) 2020-12-05 21:19:22 -08:00
Pavel Feldman 1717cbd3d5
doc: describe return value as a part of method (#4608) 2020-12-05 15:29:16 -08:00
Pavel Feldman 96a1f79e96
docs: reformat api-body to allow multiline params documentation (#4604) 2020-12-04 18:05:35 -08:00
Pavel Feldman 150d778ca7
docs: disambiguate events (#4597) 2020-12-04 11:09:20 -08:00
Pavel Feldman 761b78efc0
docs: generate links based on the method names (#4593) 2020-12-04 09:03:33 -08:00
Westbrook Johnson 7213794a65
Correct typo in "emulateMedia" call example. (#4592) 2020-12-03 22:28:50 -08:00
Pavel Feldman 2452d07ff7
docs: generate method signatures in docs (#4590) 2020-12-03 22:28:11 -08:00
Pavel Feldman 0eb6f85617
docs: pretty-print api.md (#4588) 2020-12-03 18:05:36 -08:00
Pavel Feldman 5d47a9744c
docs: reformat template parameters (#4587) 2020-12-03 16:02:34 -08:00
Max Schmitt d2b7e0d1df
fix(types): add typed cb for Page.waitForResponse (#4575) 2020-12-03 09:20:53 -08:00
Pavel Feldman 95c502d274
docs: use templates to reuse documentation properties (#4578) 2020-12-03 09:11:48 -08:00
Pavel Feldman 1fa7e86ea9
docs: generate api.md (#4576) 2020-12-02 13:50:10 -08:00
Dmitry Gozman 8cc8b777d0
docs: fix auth example (#4528)
We should wait for selector instead of asserting it.
2020-11-25 11:32:46 -08:00
Dmitry Gozman 240d51f1d3
docs: improve boundingBox documentation (#4500)
Also add a test to verify it.
2020-11-19 13:55:14 -08:00
Darío Kondratiuk c1a5cd51b1
fix(docs): remove extra code in timing docs (#4466) 2020-11-17 09:58:38 -08:00
Yury Semikhatsky dfe3552b59
feat(route): support URL overrides in continue (#4438) 2020-11-16 09:59:00 -08:00
Pavel Feldman d20e56e197
feat(state): allow getting / setting context state (#4412) 2020-11-13 14:24:53 -08:00
Joel Einbinder d8837a8040
fix(docs): add tap to actionability (#4413) 2020-11-12 02:33:04 -08:00
Dmitry Gozman c384313058
feat(fill): allow filling based on the label selector (#4342)
This enables filling the input based on the connected label:

```html
<label for=target>Name</label><input id=target>
```

```js
await page.fill('text=Name', 'Alice');
```
2020-11-05 05:22:49 -08:00
Dmitry Gozman 1c39689dd6
api(videos): introduce a single recordVideo option bag (#4309)
api(videos): introduce a single recordVideo option bag

Currently contains `dir` and `size`, previously known as
`videosPath` and `videoSize`.
2020-11-02 19:42:05 -08:00
Pavel Feldman ac8ab1e1b5
feat(websocket): add WebSocket.waitForEvent and isClosed (#4301) 2020-11-02 14:09:58 -08:00
Dmitry Gozman 9c80cbdf9e
fix(docs): small docs changes for new apis (#4305) 2020-11-02 12:48:05 -08:00
Pavel Feldman 333916a83d
infra: bump to next version on trunk at a branch point (#4288) 2020-10-29 17:46:07 -07:00
Pavel Feldman 914f6372ec
feat(proxy): enable per-context http proxy (#4280) 2020-10-29 16:12:30 -07:00
Arjun Attam 05fd572766
docs(api): remove * from permissions (#4260) 2020-10-27 11:22:15 -07:00
Pavel Feldman be8428475d
feat(websocket): implement Web Sockets for Chromium & WebKit (#4234) 2020-10-26 22:20:43 -07:00
Pavel Feldman 7fc4b797eb
feat(har): allow saving har for context (#4214) 2020-10-26 14:32:07 -07:00
Max Schmitt 8f3c0d5420
fix(docker): add pwuser to Docker focal image (#4201) 2020-10-23 08:14:15 -07:00
Pavel Feldman 8a42cdad30
feat(timing): introduce resource timing (#4204) 2020-10-21 23:25:57 -07:00
Darío Kondratiuk bed304b191
doc: update playwright-sharp link (#4202) 2020-10-21 17:12:20 -07:00
Joel Einbinder 92dda698f8
feat: tap (#4097) 2020-10-19 10:07:33 -07:00
Pavel Feldman ef3d3ca58e
doc(overrides): remove "one of" that was misleading (#4168) 2020-10-18 23:03:07 -07:00
Yury Semikhatsky 25cb649ea1
docs: fix Video.path() type (#4141) 2020-10-14 10:44:21 -07:00
Pavel Feldman 5a7685665a
api(video): restore the missing video path accessor (#4132) 2020-10-13 22:15:51 -07:00
Dana Woodman d6240a345d
docs(showcase): remove codex from users 2020-10-13 11:33:16 -07:00
Dmitry Gozman 331bb81820
docs: add note about videos saving on context closure (#4126) 2020-10-13 09:33:31 -07:00
Andrey Lushnikov 80773fa96b
fix: disable chromium sandbox by default (#4090)
Certain environments, e.g. Azure Pipelines, override default user
inside container with a custom one, whereas fail to pass proper
seccomp profile for the docker image.

As a result, chromium sandboxing fails.

To ease life of devops deploying tests in various CI's, this patch
disables Chromium sandbox by default.

References #4084
2020-10-09 11:28:22 -07:00
Max Schmitt e6a1a1c129
fix(docker): add again pwuser (#3899)
In version 1.4 we introduced a breaking change for the Docker behaviour since we removed the pwuser completely. In this PR I add this user again and create a symlink so that root uses the browser of the pwuser. This has also the benefit, that the users who wants to use the seccomp profile that they don't have to create this user.

Reference: https://playwright.slack.com/archives/CSUHZPVLM/p1600240776120400

Tested on root and on pwuser. Works.

References #4084
2020-10-08 11:53:07 -07:00
Yury Semikhatsky 09906949c2
docs(page): clarify page.close({runBeforeUnload: true}) behavior (#4086) 2020-10-07 13:27:23 -07:00
Arjun Attam aafe5dac0d
docs: add videos to verification doc (#4071)
* docs: add videos to verification doc

* review changes
2020-10-07 09:04:53 -07:00
Dmitry Gozman 5e42029fce
api: allow exposeBinding to pass handles (#4030)
This adds an option `{ handle: true }` to pass a single handle instead of arbitrary json values.
2020-10-01 22:47:31 -07:00
Tom Jenkinson c2171218fa
test: add a test for request interception with redirects (#3994) 2020-10-01 19:55:39 -07:00
Dmitry Gozman 4a77363af7
api: update videos api, hide tracing (#4015) 2020-10-01 11:06:19 -07:00
Shawn Jaques 49779d5657
Update showcase.md (#3969)
Added Root Cause OSS under tools.
2020-09-24 08:47:10 -07:00
Max Schmitt 967f3b7505
devops(docker): push focal images to CR (#3950)
This will end up in the following Docker tags:
- focal <- new
- bionic < old as before
- latest <- old as before, keep bionic for now until EOL is reached
- v1.4 <- old as before, is bionic
- v1.4-focal <- new, is focal

Depends on https://github.com/aslushnikov/devops.aslushnikov.com/pull/3 to ensure it works.
Relates to https://github.com/microsoft/playwright/issues/3791.
2020-09-23 15:10:43 -07:00
Max Schmitt becdccdf03
devops(docker): added Dockerfile for Ubuntu 20 focal (#3891)
Each Ubuntu and Debian release has a code name. Ubuntu 18(bionic), Ubuntu 20(focal). This adds the Dockerfile for Ubuntu20.
Next steps and follow up changes:
- add it to the devops site, so we are sure all tests are passing, locally they did
- deploy it to the MCR, naming needs to be clarified, probably just as "focal".

This naming schema allows us in the future to add Debian support too. But we should wait until Headless WK is fixed.

Relates #3791
Relates #2758
Closes #3338
2020-09-21 08:47:44 -07:00
Dmitry Gozman df777344a3
api(video): simplify video api (#3924)
- This leaves just `recordVideos` and `videoSize` options on the context.
- Videos are saved to `artifactsPath`. We also save their ids to trace.
- `context.close()` waits for the processed videos.
2020-09-18 17:36:43 -07:00
Dmitry Gozman 0ade6af689
api(trace): introduce artifacts options (#3914)
api(trace): introduce artifacts options

This introduces launch({ artifactsPath }) and newContext({ relativeArtifactsPath, recordTrace }) options.
- artifactsPath option controls the directory where all artifacts go. If not passed, artifacts are not collected.
- relativeArtifactsPath can be used to put context-specific artifacts into a subfolder. If not passed, shared artifactsPath is used.
- recordTrace controls trace recording.

We also expose trace types under playwright/types/trace.d.ts.

In the follow up:
- videos will be put into artifactsPath;
- downloads will be put into artifactsPath, or keep using existing downloadsPath when artifactsPath is not specified.
2020-09-18 11:54:00 -07:00
Mikko Korpela 73db4a450e
docs(api): fix typo
Fix typo in fullPage description.
2020-09-16 14:07:27 -07:00
Max Schmitt dfbd1ceacc
docs(languages): added Go reference (#3867) 2020-09-14 07:54:58 -07:00
Max Schmitt beceeaf6a1
feat(browserContext): add BrowserContext.browser() (#3849) 2020-09-14 07:50:47 -07:00
Yury Semikhatsky 40323aa94d
fix(screencast): use viewport as default size (#3844) 2020-09-11 15:14:31 -07:00
Nathan Hoffmann 75e847a6fa
docs(pom.md): fix typo in example function name (#3855)
The patch renames the `goto` function in page object model documentation to `navigate`.

Fixes #3854
2020-09-11 12:28:28 -07:00
Yury Semikhatsky 3495842e7f
docs(screencast): add a snippet for _videostarted (#3842) 2020-09-10 16:32:47 -07:00
Andrey Lushnikov 45542a5334
docs: fix table-of-contents generation (#3840) 2020-09-10 15:14:00 -07:00
Kerkko Pelttari ce30807533
Add RobotFramework Browser library to showcase.md (#3827) 2020-09-10 09:50:31 -07:00
Arjun Attam 4240e1df1d
docs: add page on language bindings (#3819) 2020-09-09 17:33:10 -07:00
Arjun Attam 777689a96a
docs(intro): add cli to getting started (#3821)
* docs(intro): add cli to getting started

* fix doclint
2020-09-09 17:32:49 -07:00
Arjun Attam ee98bd0a29
docs(selectors): update structure and add best practices (#3817)
* docs(selectors): update structure and add best practices

* dgozman comments
2020-09-09 17:14:33 -07:00
Max Schmitt ff0d697151
docs(docker): add note how to use chromium sandbox (#3779) 2020-09-09 11:43:15 -07:00
Yury Semikhatsky 66985fc5f6
feat(screencast): add expreimental public API on context (#3766) 2020-09-04 22:37:38 -07:00
Arjun Attam 25fe115719
docs: update why-playwright.md (#3761)
* docs: update why-playwright.md

* review fixes
2020-09-04 13:34:28 -07:00
Arjun Attam 921c8d8d8c
docs: add help section (#3741) 2020-09-03 16:57:22 -07:00
Max Schmitt 5f6441e6df
chore(docker): use root user in Docker image (#3739)
As discussed offline other big images like Node.js or Nginx use root as the default user and the users in the end can base-off from our image to add their security features.

Not sure if follow up docs changes are required for that.

Fix #3703
Fix #3681
2020-09-02 14:42:01 -07:00
Andrey Lushnikov b7f6a98deb
devops: use a helper script to tag and push docker images (#3737)
It turns out that the new `docker push --all-tags` is not yet available
in the latest docker distribution on Ubuntu 20.04.

This provides a helper script to tag and publish the docker image.
2020-09-02 14:28:01 -07:00
Andrey Lushnikov d71d2f5765
devops: install ssh in the docker image (#3716)
References #3681
2020-09-01 16:43:20 -07:00
Andrey Lushnikov ef5c87ccea
devops: switch docker publishing to a bash script (#3704)
It turns out Github Actions have docker pre-installed.

This patch unifies the codepaths that we use to build docker image
locally and to publish it from CI.

As a result, there's no extra `--prepare-context` argument in
`//docs/docker/build.sh` that was used solely on CI.

References #2926
2020-09-01 11:33:19 -07:00
Amit Zur 8f37d78fd3
Add Applitools SDK to the showcase (#3694)
* Add Applitools

* Add Applitools
2020-08-31 09:52:21 -07:00
Arjun Attam fb6d1ad591
docs(docker): add link to mcr status ui (#3679) 2020-08-28 14:30:51 -07:00
Arjun Attam 2edd6f2824
docs: introduce why-playwright.md (#3666) 2020-08-28 09:38:12 -07:00
Arjun Attam 7444de4b73
docs: update navigation and loading page (#3655)
* docs: update navigation and loading doc

* dgozman comments

* doclint
2020-08-27 17:47:23 -07:00
Andrey Lushnikov 3ea3cf0373
devops: add yarn and git in the docker container (#3651)
This will help consuming docker image as an env for test execution.

Fixes #3529
2020-08-26 20:16:24 -07:00
Andrey Lushnikov c96ea4b6de
chore: remove docker image size computation scripts (#3650)
The scripts are broken atm. They're re-implemented in the
devops website: https://devops.aslushnikov.com for now.
2020-08-26 16:00:34 -07:00
Blake Williams 5f86253ad4
docs: add more detail to waitForNavigation API method (#3635) 2020-08-25 21:05:27 -07:00
Max Schmitt 0af3d8e285
docs(showcases): added example for Heroku (#3414)
Co-authored-by: Arjun Attam <arjunattam@gmail.com>
2020-08-25 10:59:13 -07:00
Max Schmitt aeab0fa330
docs(docker): add note about how to list all tags (#3596)
* docs(docker): add note about how to list all tags

* Update README.md

Co-authored-by: Arjun Attam <arjunattam@gmail.com>
2020-08-25 10:46:21 -07:00
Max Schmitt 72b3147d7c
docs(example): simplified overwriting of requests (#3621) 2020-08-25 10:37:45 -07:00
ragog 2b3a1ae9c6
docs: add theheadless.dev to showcase (#3597) 2020-08-24 08:08:54 -07:00
Dmitry Gozman cd220daa83
chore: move src files to server (#3593) 2020-08-24 06:51:51 -07:00
Dmitry Gozman 18292325b6
api: add waitForElementState('disabled') (#3537)
Allows waiting for the element to be disabled.
2020-08-19 17:20:10 -07:00
Arjun Attam a78d83e833
docs: clarify response and requestfinished events (#3532)
* docs: clarify response and requestfinished events

* fix typo
2020-08-19 13:36:56 -07:00
Dmitry Gozman 0e9793c452
api: ElementHandle.waitForElementState (#3501)
This method waits for visible, hidden, stable or enabled state,
similar to the actionability checks performed before actions.

This gives a bit more control to the user. Some examples:
- Allows to wait for something to be stable before taking a screenshot.
- Allows to wait for the element to be hidden/detached after a specific action.
2020-08-17 16:22:34 -07:00
Dmitry Gozman 85c93e91a7
api: introduce ElementHandle.waitForSelector (#3452)
This is similar to Frame.waitForSelector, but relative to the handle.
2020-08-14 14:47:24 -07:00
Dmitry Gozman dec8fb7890
fix(hover): do not require the element to be enabled before hovering (#3445) 2020-08-14 13:18:32 -07:00
Pavel Feldman 2f5a0a6c07
test: slowly removing testOptions (#3464) 2020-08-14 07:22:54 -07:00
Natan d9727c62df
Typo fix (#3430) 2020-08-13 10:44:17 -07:00
Arjun Attam 06ddacd7be
docs: introduce doc on authentication (#3404) 2020-08-12 16:02:23 -07:00
Dmitry Gozman a574fa6edb
api: add Frame.page() getter (#3392) 2020-08-12 14:45:36 -07:00
Dmitry Shcherbakov 22d1be32fb
docs: add showcase how to use allure-report and jest-circus with playwright (#3408) 2020-08-12 14:34:58 -07:00
Arjun Attam be7db4d2c6
docs(ci): add sample config for jenkins (#3398) 2020-08-12 14:01:55 -07:00
Ross Wollman 079b6e0a66
docs: add getting help section (#3410)
The Playwright Community is awesome and responsive! <3 Let's make the
community as a resource more prominent in the docs. (Currently they just
appear in a footer, but this change calls it out explicitly.)
2020-08-12 10:31:35 -07:00
Arjun Attam 9375cc62b8
docs: introduce docs for page object models (#3391) 2020-08-11 15:46:36 -07:00
Dmitry Gozman 6c68435e7e
docs: make api docs around pointer actions more explicit (#3374)
- Describe performed steps in detail.
- Describe timeout conditions.
2020-08-10 15:08:52 -07:00
Dan Bjorge 6f3f608d5b
docs(showcase.md): add Accessibilty Insights to community showcase (#3368) 2020-08-10 10:22:45 -07:00
Dmitry Gozman c6acc32889
docs(api): explicit nulls, use Serializable and EvaluationArgument more (#3358) 2020-08-07 20:55:22 -07:00
Yevhen 6a19bf5b54
docs(showcase): add expected-condtion-playwright library (#3356)
* docs(api/input): fix typo

* docs(api): remove extra square bracket

* docs(showcase): add expected-condtion-playwright library
2020-08-07 16:29:59 -07:00
Yevhen 3665bb0a9a
docs(api): remove extra closing square bracket, add an opening square bracket. (#3342) 2020-08-07 08:29:31 -07:00
Thad Guidry 9d543f9446
docs: fix typo in Core Concepts doc page (#3343) 2020-08-07 08:27:47 -07:00
Arjun Attam 4ec3290da3
docs(api): replace select-all note with example (#3328) 2020-08-06 21:23:30 -07:00
Dmitry Gozman cdfe73fee3
api(console): make ConsoleMessageLocation properties required (#3290)
Everywhere in our api, possibly missing properties are nullable.
However, to make things easier for everyone, we just default to an
empty url instead, so that users do not have to null-check it.
2020-08-05 22:25:56 -07:00
Pavel Feldman b03b4a5566
chore: doc type nits (#3283) 2020-08-05 09:54:31 -07:00
Arjun Attam 1673e62779
docs: update table of contents for docs sidebar (#3291) 2020-08-04 15:48:32 -07:00
Dmitry Gozman 028dd08155
docs: update documentation for evaluation argument (#3287) 2020-08-04 14:45:34 -07:00
Yury Semikhatsky de55fa6482
fix(webkit): ensure WebKit can play h264 video (#3272) 2020-08-03 16:06:57 -07:00
Dmitry Gozman ba9030e6be
docs: update api.md with more references to actionability (#3255) 2020-07-31 12:16:21 -07:00
Dmitry Gozman 928a1769ef
docs: update docs (#3253)
- Make docs/README.md more prominent, include capabilities
- Link to examples from specific topics
2020-07-31 11:58:12 -07:00
Ross Wollman ce0ddd270b
feat(download): create directories for saveAs (#3249)
This is to match the behavior for screenshots path added in #3247.
2020-07-30 23:21:03 -07:00
Pavel Feldman 93056ed8ef
chore(rpc): more protocol nits (#3246) 2020-07-30 17:51:41 -07:00
Dmitry Gozman 2f95b6e34e
feat(selectors): auto-detect xpath starting with ".." (#3239) 2020-07-30 16:21:48 -07:00
Pavel Feldman 1728a3df93
chore: minor protocol fixes (#3226) 2020-07-30 11:14:41 -07:00
Dmitry Gozman 9132d23b2b
fix(screenshot): wait for stable position before taking element screenshot (#3216)
Same goes for scrollIntoViewIfNeeded.
2020-07-29 16:36:02 -07:00
Max Schmitt 21b1be7351
docs(selectors): fixed selector register example (#3169) 2020-07-29 10:37:57 -07:00
Dmitry Gozman 97c10002e7
api: introduce Browser.version() (#3177) 2020-07-27 13:41:35 -07:00
Tierney Cyren 51ce47f30f
docs: use "Node.js" instead of "Node" (#3176)
* docs: use "Node.js" instead of "Node"

* docs: fix broken anchor
2020-07-27 10:27:41 -07:00
Pavel Feldman e7cca86757
fix(postData): allow overriding binary post data (#3120) 2020-07-24 12:16:45 -07:00
Pavel Feldman 80c0711d98
feat(firefox): roll firefox to r1137 (#3095) 2020-07-22 15:59:37 -07:00
Ross Wollman d8a17fb0ab
api(download): Add saveAs helper (#2872) 2020-07-22 14:55:27 -07:00
Dmitry Gozman ced0bc2d1b
api: make clear the use of null in page.emulateMedia (#3078)
We can pass null to disable emulating particular feature.
This change updates the docs and rpc protocol accordingly.
2020-07-21 18:56:41 -07:00
Andrey Lushnikov c0d9ccfebf
docs: update documentation on Chromium sandbox (#3077)
This patch:
- updates docker seccomp profile to use a slightly modified default docker
profile
- removes SUID sandbox documentation since it doesn't seem to work

References #2745
2020-07-21 17:43:41 -07:00
Andrey Lushnikov 47e30f047b
feat: introduce chromiumSandbox launch option (#3067)
The option is intended to be used instead of the `--no-sandbox`
argument that is accepted exclusively by Chromium and crashes
WebKit.

References #2745
2020-07-21 13:49:09 -07:00
Pavel Feldman 99658c2d32
feat(bringToFront): enable on all browsers (#3052) 2020-07-21 09:36:54 -07:00
Darío Kondratiuk 79d5991a27
doc: Improve unroute documentation (#3026) 2020-07-18 10:54:09 -07:00
Pavel Feldman 6199ba28a9
devops: remove travis, appveyor, circle for now (#3029) 2020-07-18 10:52:47 -07:00
Andrey Lushnikov 7d2078ef6f
devops: bake browsers into Docker image (#2990)
This patch bakes browsers into docker image.

Important observations:
- We now re-build docker image everytime we roll browsers.
- Docker image size almost doubles: from `225MB` to `496MB`.

References #2926
2020-07-17 16:51:39 -07:00
Tapajyoti Bose 16e3776a9c
fix(JSCoverageEntry): added scriptId and isBlockCoverage (#2955) 2020-07-16 20:32:49 -07:00
Andrey Lushnikov 824f6491d3
devops(docker): fix docker for chromium (#2966)
Docker image size doesn't change.
2020-07-15 17:20:48 -07:00
Andrey Lushnikov d750ba38cd
fix(docker): add missing dependencies to docker image (#2963) 2020-07-15 17:15:03 -07:00
Andrey Lushnikov 6c75cbe5f5 docs: fix link to github workflow in releasing doc 2020-07-13 17:24:25 -07:00
Andrey Lushnikov a06ba1c770
devops: add utility to count compressed docker image size (#2920)
This adds a new script to calculate docker image size with
all parent layers.

Note: take this metrics with a grain of salt, since in reality
docker compresses and reuses layers.

Some historic stats obtained with this script:
- **`208MB`** (-33MB) chore(docker): skip "recommended" dependencies (#2917) (1cebf8757c)
- **`241MB`** (-29MB) chore(docker): trim some of the gstreamer dependencies (#2897) (bce4b1aea9)
- **`272MB`** (-1MB) devops: do cache busting for APT (#2656) (bb34418095)
- **`273MB`** (+49MB) fix(webkit): update Docker file to include gstreamer (#2636) (5c6c65915c)
- **`224MB`** (+0MB) chore: fix emojis for CR and FF in Dockerfile (#2522) (24316ad261)
- **`224MB`** (-1MB) fix: Dockerfile for Firefox (#1937) (b516ac4fb2)
- **`225MB`** (+49MB) devops(docker): Install ffmpeg dependency, adding codecs necessary for video playback in Firefox (#1627) (222d01caaa)
-  **`176MB`** (+32MB) chore(docs): optionally install XVFB in docker(ec3ee66043)
-  **`144MB`** (+144MB)  feat: add a playwright-ready docker image (#1161)(1781ae7006)
2020-07-13 17:16:19 -07:00
Arjun Attam b2d820a185
docs(emulation): separate section for dark mode (#2915) 2020-07-13 15:47:13 -07:00
Yury Semikhatsky 1cebf8757c
chore(docker): skip "recommended" dependencies (#2917) 2020-07-10 16:01:30 -07:00
Yury Semikhatsky bce4b1aea9
chore(docker): trim some of the gstreamer dependencies (#2897) 2020-07-10 15:56:52 -07:00
Arjun Attam 6a1bd3ae6e
docs: add debugging docs page (#2865) 2020-07-08 08:59:58 -07:00
Yevhen de7969f0f5
docs(api/input): fix typo (#2837) 2020-07-07 10:46:13 -07:00
Arjun Attam e154e0837b
docs(ci): fix gitlab setup 2020-06-29 16:04:58 -07:00
Arjun Attam c8076121e2
docs: add new doc for multi-page scenarios (#2737)
* docs: multi-page scenarios

* docs: multi-page scenarios

* docs: multi-page scenarios
2020-06-29 15:46:33 -07:00
Arjun Attam 69127ad8d3
docs(docker): update to use official image (#2760) 2020-06-29 15:23:01 -07:00
Arjun Attam aad6301aca
docs(ci): update intro, caching section, add gitlab (#2735) 2020-06-26 17:49:18 -07:00
Arjun Attam 0cb5e95bdf
docs(frames): improve snippet to get frame (#2734) 2020-06-26 17:49:03 -07:00
Dmitry Gozman 807dc1f324
fix(crash): improve documentation for crash, reject waitForEvent (#2694) 2020-06-25 09:53:56 -07:00
Dmitry Gozman 39ce35e154
fix(errors): strict error handling around element operations (#2567)
- Gave all possible dom errors distinct names, and throw them on the node side.
- Separated errors into FatalDOMError and RetargetableDOMError.
  Fatal errors are unrecoverable. Retargetable errors
  could be resolved by requerying the selector.
- This exposed a number of unhandled 'notconnected' cases.
- Added helper functions to handle errors and ensure TypeScript catches
  unhandled ones.
2020-06-24 15:12:17 -07:00
Dmitry Gozman 355305d31d
feat(screenshot): accept timeout, migrate to Progress, wait for visible (#2679)
Element screenshot now waits for the element to become visible and
throws on detach.

Both screenshot methods accept a timeout and capture logs using Progress.
Also, carefully handling exceptions and restoring the viewport.
2020-06-24 10:16:54 -07:00
Arjun Attam 4af8c6831e
docs: improve snippets for console logs (#2684) 2020-06-23 19:34:18 -07:00
Dmitry Gozman d0a6e1a64e
fix(dom): make selectText and scrollIntoViewIfNeeded wait for visible (#2628)
All other methods wait for the element to be visible, so we should make
them behave similarly.
2020-06-23 13:02:31 -07:00
Ivan Krutov a8eaee3173
docs: add Moon to showcase.md (#2677) 2020-06-23 10:54:37 -07:00
Arjun Attam 6cec2dfb7c
docs: add assertions doc (#2585)
* docs: add assertions doc

* docs: assertions and verification split
2020-06-22 16:53:56 -07:00
Andrey Lushnikov bb34418095
devops: do cache busting for APT (#2656)
To avoid caching old package lists, every `apt-get install`
should be prefixed with `apt-get update`.

More info on the matter:
- https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get
- https://github.com/moby/moby/issues/3313
2020-06-22 15:54:19 -07:00
Yury Semikhatsky 5c6c65915c
fix(webkit): update Docker file to include gstreamer (#2636) 2020-06-18 18:12:00 -07:00
Max Schmitt 20b23cd21e
docs: fixed various typos (#2633) 2020-06-18 15:04:21 -07:00
Andrey Lushnikov f61e85291b
docs: update docs for per-browser download hosts (#2630) 2020-06-18 12:35:37 -07:00
Othman Lanizi 090d450651
docs(core-concepts.md): fix typos (#2608)
Realized that the evaluateHandle method wasn't spelled properly in these two instances.
2020-06-17 14:16:56 -07:00
Arjun Attam 1bc04a088b
docs: using DEBUG=pw:api (#2578) 2020-06-15 18:34:58 -07:00
Dmitry Gozman fd9b1031fa
docs: add actionability doc (#2577) 2020-06-15 13:40:55 -07:00
Arjun Attam 2659910be8
docs: make environment vars snippets cross-platform (#2564) 2020-06-13 13:11:39 -07:00
Arjun Attam 6530c18acd
docs: improvements to ci provider configs (#2565) 2020-06-13 13:11:24 -07:00
Darío Kondratiuk e3f34f6ae2
fix(selectOption): allow passing null to unselect all (#2405) 2020-06-10 09:37:29 -07:00
Max Schmitt 24316ad261
chore: fix emojis for CR and FF in Dockerfile (#2522) 2020-06-10 08:02:56 -07:00
Pavel Feldman 9aa9d6bc1d
feat(downloads): accept downloads in persistent, allow specifying the downloadsPath (#2503) 2020-06-08 21:45:35 -07:00
Pavel Feldman fb058ffe0d
feat(proxy): allow specifying proxy (#2485) 2020-06-05 13:50:15 -07:00
Pavel Feldman c001facffc
feat(firefox): allow passing user prefs at launch time (#2417) 2020-05-31 09:28:57 -07:00
GkqqNkKC 59a0451b62
docs: fix spell mistake on api.md (#2408) 2020-05-29 08:51:45 -07:00
Dmitry Gozman 057ae14adc
feat: make browserServer.kill() wait for the process to exit (#2375)
This ensures we cleaned everything up.
2020-05-27 19:59:03 -07:00
Max Schmitt 9dfe9348ac
feat: Request.postDataJSON (#2368) 2020-05-27 18:43:49 -07:00
Daniel Rosenwasser 4e86d39881
docs: recommend a dev install of Playwright in the docs. (#2355) 2020-05-26 10:24:48 -07:00
Dmitry Gozman aae3f1e75d
feat(default context): support selected options for default context (#2177) 2020-05-21 15:13:16 -07:00
Pavel Feldman 2ede4bce12
chore: further unify launching and connection (#2320) 2020-05-21 09:43:10 -07:00
Andrey Lushnikov e658a3e48a
docs(click.md): update click.md documentation (#2303)
Updates according to 545c43d28d
2020-05-20 00:04:44 -07:00
Andrey Lushnikov f24696be62
feat: add page convenience methods for textContent and getAttribute (#2235)
This patch adds:
- `page.innerText()` / `frame.innerText()`
- `page.innerHTML()` / `frame.innerHTML()`
- `page.textContent()` / `frame.textContent()`
- `page.getAttribute()` / `frame.getAttribute()`

Fixes #2143
2020-05-18 17:58:23 -07:00
Pavel Feldman 2bd427ad1d
feat(exposeBinding): a more powerful exposeFunction with source attribution (#2263) 2020-05-18 14:28:06 -07:00
David Gilbertson 9e2733d520
docs(test-runners.md): add WebStorm comment (#2279) 2020-05-17 20:43:00 -07:00
David Gilbertson 125312f78b
docs(core-concepts.md): fix typo (#2273) 2020-05-17 08:58:33 -07:00
Dmitry Gozman 696b40a508
docs: update click.md 2020-05-14 10:44:20 -07:00
Dmitry Gozman e96e471e40
docs: draft for the various click scenarios doc (#2218) 2020-05-13 15:15:14 -07:00
Pavel Feldman f63ea3ffd2
feat(downloads): expose suggested filename (#2062) 2020-05-12 19:23:08 -07:00
Arjun Attam 84f966c301
docs: fix typo 2020-05-12 18:32:47 -07:00
Dmitry Gozman 6361e07ae4
fix(docs): clarify repeating calls to setHTTPCredentials (#2212) 2020-05-12 18:29:55 -07:00
Andrey Lushnikov 5d49c5d612
docs: refer to "working with selectors" from all 'selector' arguments (#2213)
The "working with selectors" section elaborates on rules that we use
to parse selectors.

Fixes #2197
2020-05-12 16:15:14 -07:00
Andrey Lushnikov b4acc56d63
docs(api.md): elaborate on visibility options in waitForSelector (#2208)
Fixes #2202
2020-05-12 15:46:19 -07:00
Arjun Attam 054ee639b4
docs(ci): elaborate ci caching docs (#2192) 2020-05-11 22:52:21 -07:00
Łukasz Fiszer 0c51a2e89d
docs: add mockiavelli library to Showcase (#2181) 2020-05-11 13:11:59 -07:00
Arjun Attam 2510edc394
docs(ci): update docs for caching and troubleshooting (#2176) 2020-05-11 09:54:03 -07:00
Pavel Feldman d487a315b9
doc: fix the route docs (#2174) 2020-05-11 08:22:48 -07:00
Vasilii Artemchuk 4c4fa8d38c
docs: some syntax fixes (#2116) 2020-05-07 12:33:35 -07:00
Pavel Feldman f86ddacb85
docs: mention click(force) and dispatchEvent(click) in the click docs (#2136) 2020-05-07 12:29:59 -07:00
Pavel Feldman 41de5bc388 Revert "chore: mark v0.18.0 (#2122)"
(should go only into branch)
This reverts commit 19e8c327ba.
2020-05-05 16:55:55 -07:00
Pavel Feldman 19e8c327ba
chore: mark v0.18.0 (#2122) 2020-05-05 16:52:54 -07:00
Andrey Lushnikov 193924f405
chore: add script to generate release notes (#2099) 2020-05-04 22:28:09 -07:00
Vasilii Artemchuk 52aa929922
docs(api.md): emulateMedia syntax fixes (#2104) 2020-05-04 17:48:18 -07:00
Vasilii Artemchuk ef9eed8702
docs(api.md): emulateMedia example fix (#2100) 2020-05-04 15:06:33 -07:00
Pavel Feldman bcce48362a
api(waitForSelector): make "state: visible" default, includes rename to state (#2091) 2020-05-04 11:03:44 -07:00
Pavel Feldman bb13a329f0 docs: better intro toc 2020-05-03 14:22:07 -07:00
Pavel Feldman 5bc62a0e25 docs: add anchors for toc topics 2020-05-03 11:23:19 -07:00
Pavel Feldman eed2bac441 docs: added overview links 2020-05-03 11:17:01 -07:00
Max Schmitt 22e7513272
docs(verification): fixed unclosed code tag (#2085)
Caused in 3979d4f492 and ended up in a failing CI
2020-05-03 07:59:41 -07:00
Sergey Bekrin c38f26ea02
docs(installation.md): update cache path on linux (#2084) 2020-05-03 07:58:46 -07:00
Pavel Feldman 3979d4f492 docs: bring snippets higher up in the docs 2020-05-02 17:21:46 -07:00
Andrey Lushnikov 3251465657
chore: add script to fetch closed bugs since git commit (#2066) 2020-04-30 17:57:45 -07:00
Arjun Attam 7051c0bf34
docs(installation): update windows location 2020-04-30 17:41:56 -07:00
Pavel 671e465450 docs(testrunners): brush up testrunners doc 2020-04-30 12:28:10 -07:00
Joel Einbinder 12edf4f03f
doc: test runner examples (#2057) 2020-04-30 11:24:27 -07:00
Andrew Healey 06273ef955
docs(api.md): Fix wording of javaScriptEnabled description (#2050) 2020-04-29 22:21:07 -07:00
Dmitry Gozman 953dd36d38
feat(api): remove 'mutation' polling option (#2048)
It is not compatible with shadow dom.
2020-04-29 21:34:14 -07:00
Pavel Feldman 9f62f29946
feat(install): use shared installation folder by default (#2044) 2020-04-29 18:59:20 -07:00
Dmitry Gozman 3fefa7b7ff
docs: fix docs for $foo methods that assumed css selectors (#2039) 2020-04-29 15:24:59 -07:00
Steve Davis 4652b9e248
docs: Recommend using --ipc=host in docker (#2038) 2020-04-29 14:52:50 -07:00
Dmitry Gozman 3a29631e9f
docs: improve docs around actionability and visibility (#2036) 2020-04-29 14:18:01 -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
Dmitry Gozman 4b0d977489
fix(docs): clarify the single/double quotes usage in text selector (#2002) 2020-04-27 14:16:13 -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
Arjun Attam a2664b1580
docs: update ci section in getting started 2020-04-27 09:27:50 -07:00
Arjun Attam 158e592fa8
docs(installation): adds requirements and renames the doc (#1965) 2020-04-24 12:20:04 -07:00
Arjun Attam 8ceba1eea0
docs(ci): update ci docs to emphasize gh action (#1964) 2020-04-24 12:19:54 -07:00
Arjun Attam 28f98ac278
docs(readme): update readme and intro docs (#1963) 2020-04-24 12:19:31 -07:00
Andrey Lushnikov 4b263d6334
docs(releasing): update releasing docs according to new process (#1958) 2020-04-24 08:55:29 -07:00
Marcin Pietruszka 3c71125d7f
Fix typo (#1961) 2020-04-24 08:48:19 -07:00
Andrey Lushnikov 21dc346b16
devops: auto-correct links in our documentation (#1955) 2020-04-23 19:52:06 -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
Pavel Feldman 40bed0f50c
docs: fix typos (#1947) 2020-04-23 13:40:34 -07:00
Arjun Attam 51ed5c5b4d
fix(examples): closes #1916 (#1934) 2020-04-23 08:44:58 -07:00
Max Schmitt b516ac4fb2
fix: Dockerfile for Firefox (#1937) 2020-04-23 08:43:53 -07:00
Andrey Lushnikov f8f3b8862c
docs(verification.md): fix typo 2020-04-22 00:32:46 -07:00
Andrey Lushnikov 89007c8f3d
devops: make README.md to always reflect tip-of-tree (#1911)
As of today, we have tooling in place that makes sure that our
main README.md **roughly** represents the state of the last release:
- browser versions and browser badges are those that we released last
- links to our API point to the last-released API version

This tooling, however, relies on the fact that every release is a sequence
of two consecutive commits:
- one commit that sets `package.json` version to a released version
- the following that "bumps" version to `-post`.

This release process is very unfortunate, because:
- it made releasing from branch impossible
- it required "freezing" commits to the master branch

This patch removes all the tooling and transitions `README.md` to always
represent tip-of-tree state. We will fully rely on
`https://playwright.dev` to show versioned docs.
2020-04-21 22:08:56 -07:00
Andrey Lushnikov 0815ff36be
docs(browsers.md): fix nit 2020-04-21 17:19:10 -07:00
Pavel Feldman fa18c419af
docs(browsers.md): updates and nits 2020-04-21 17:17:29 -07:00
Pavel Feldman 18650589e2
docs(browsers.md): updates and nits 2020-04-21 17:13:14 -07:00
Andrey Lushnikov 89b2fe5f38
feat: introduce PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD env variable (#1892) 2020-04-21 16:47:16 -07:00
Andrey Lushnikov 0935144c21
docs(browsers): add documentation describing managing browsers (#1907) 2020-04-21 16:38:40 -07:00
Arjun Attam 88366f3bb9
docs: adds introduction.md (#1905)
* docs: adds introduction.md

* elaborate on async/await pattern
2020-04-21 15:42:52 -07:00
Yury Semikhatsky e9914ccfea
docs: fix formatting 2020-04-21 11:28:08 -07:00
Pavel Feldman 5b085fdf03
feat(logger): introduce context-level logger (#1896) 2020-04-20 23:24:53 -07:00
Pavel Feldman 80a7fcd2de docs(verification): nits and typos 2020-04-20 17:35:50 -07:00
Yury Semikhatsky c2fe55e630
docs: add verification guide (#1885) 2020-04-20 16:56:46 -07:00
Pavel Feldman 0656771167
api(networkidle): remove networkidle2 (#1883) 2020-04-20 16:52:26 -07:00
Dmitry Gozman 3485ffb4e6
fix(docs): fix snippets, integrate navigations to ToC and core concepts (#1884) 2020-04-20 14:04:49 -07:00
Pavel Feldman 4d8c057d9c docs(selectors&ci): brush up respective sections 2020-04-20 10:38:46 -07:00
Yury Semikhatsky 621df5d68b
docs: fix cross references (#1877) 2020-04-20 10:29:01 -07:00
Yury Semikhatsky ed89c379cb
docs: fix API references 2020-04-20 10:16:56 -07:00
Pavel Feldman 6231d50ba5 docs(core-concepts): follow up on object handles 2020-04-20 09:53:48 -07:00
Andrey Lushnikov 39b37be788
docs(core-concepts.md): add section regarding object & element handles (#1871) 2020-04-20 09:46:36 -07:00
Pavel Feldman 1f43ae692f
feat(logging): introduce logger sink api (#1861) 2020-04-20 07:52:26 -07:00
Pavel Feldman ef7815e95b doc(network): reorder items in network docs 2020-04-19 19:42:40 -07:00
Pavel Feldman f6fec27900 docs(core-concepts): add selectors and auto-wait sections 2020-04-19 19:06:23 -07:00
Pavel Feldman 92a4c70331
docs(input): include clicks and files sections (#1868) 2020-04-19 18:47:36 -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
Pavel 629b77271c docs(loading): nits and fixes 2020-04-16 15:02:41 -07:00
Pavel e67603db27 docs(emulation): review, fix nits 2020-04-16 14:19:21 -07:00
Yury Semikhatsky 42eefa674b
docs: emulation guide (#1831) 2020-04-16 13:54:21 -07:00
Arjun Attam 67cd5698a7
docs: typo fix 2020-04-16 12:48:16 -07:00
Pavel Feldman da24fe12a6
docs: rename to upload-download.md 2020-04-16 12:13:22 -07:00
Arjun Attam ae6b1ba7ce
docs(uploads): fix typo 2020-04-16 11:55:11 -07:00
Pavel Feldman 0d4f73f251
docs(core-concepts): some nits (#1827) 2020-04-16 11:10:11 -07:00
Pavel Feldman 08c8a74e09
docs(network): polish network docs (#1826) 2020-04-16 10:48:38 -07:00
Arjun Attam 858f643e8b
docs(concepts): introduce core concepts doc (#1824) 2020-04-16 10:27:31 -07:00
Pavel Feldman 2280126344
api(setInputFiles): introduce page/frame helpers, document, break compat (#1818) 2020-04-16 10:25:28 -07:00
Andrey Lushnikov 58bb874299
docs(network): introduce network docs (#1822)
* docs(network): introduce network docs

* update title
2020-04-16 09:39:33 -07:00
Dmitry Gozman ba36860d79
feat(api): page.unroute to remove routes (#1813) 2020-04-15 19:55:22 -07:00
Dmitry Gozman 88054e34c9
feat(docs): initial version of the loading explainer (#1800) 2020-04-15 15:21:27 -07:00
Pavel 60eb3cdd3d docs(input): minor edits 3 2020-04-15 11:05:24 -07:00
Pavel 089a9dde96 docs(input): minor edits 2 2020-04-15 11:02:47 -07:00
Pavel 438d2761ff docs(input): minor edits 2020-04-15 11:01:27 -07:00
Pavel Feldman 50680dee57
docs(input): start crafting the input cheat sheet (#1804) 2020-04-15 10:53:47 -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 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 c2fc4035ba
doc(keyboard): document Shift+ArrowLeft notation (#1771) 2020-04-14 13:11:02 -07:00
Lucas Willems bb0b6cd90a
Update api.md (#1773) 2020-04-14 08:38:59 -07:00
Andrey Lushnikov abf1219fc1
docs(api.md): string values should be quoted (#1766) 2020-04-13 18:58:03 -07:00
Dmitry Gozman 9542f47511
feat(selectors): deep selector which pierces open shadow roots (#1738) 2020-04-13 13:04:27 -07:00
Arjun Attam 183840586f
docs(ci): update link to github action (#1742) 2020-04-10 10:24:22 -07:00
Pavel Feldman 78abf5cb40
feat(api): add getAttribute, innerText, innerHTML, textContent (#1717) 2020-04-09 16:49:23 -07:00
Andrey Lushnikov b385ea8415
chore: bump version to v0.13.0-post (#1721) 2020-04-08 17:30:45 -07:00
Andrey Lushnikov 17e645ad34
chore: mark version v0.13.0 (#1720) 2020-04-08 16:53:44 -07:00
Andrey Lushnikov 6723254266
docs: remove stale file (#1719)
We don't support web bundling at the moment.
2020-04-08 15:39:26 -07:00
Andrey Lushnikov d21e2c9b46
docs(api.md): clarify downloads lifetime (#1698) 2020-04-07 17:13:42 -07:00
Tyler Wilcock 222d01caaa
devops(docker): Install ffmpeg dependency, adding codecs necessary for video playback in Firefox (#1627)
Fixes #1613
2020-04-07 16:09:27 -07:00
Pavel Feldman c6f580faf8
chore: migrate from timeouts to deadlines internally (#1695) 2020-04-07 14:35:34 -07:00
Arjun Attam 362b72cf9d
docs(docker): fix tag in docker run command (#1694) 2020-04-07 11:21:42 -07:00
Andrey Lushnikov 4cf5cf6c0e docs(api.md): fix link to download class 2020-04-07 00:27:08 -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 a91304a37a
feat(selectors): attribute selectors pierce open shadow roots (#1656)
References #1375.
2020-04-03 20:47:08 -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
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
| |三 \/ | |\| 2ac69670cd
docs(api.md): remove dead link to FAQ section (#1640)
The FAQ section part, where `https://github.com/Microsoft/playwright/#q-why-doesnt-playwright-vxxx-work-with-chromium-vyyy` points to, doesn't exist anymore. This pull request simply removes the dead link.
2020-04-02 10:16:01 -07:00
Arjun Attam 9d04dcc0ce
docs(examples): working with selectors (#1624) 2020-04-01 16:06:07 -07:00
Arjun Attam 1f0b7bff04
docs(api): update ordering for $eval and $$eval (#1623) 2020-04-01 13:09:24 -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
Arjun Attam 2402aade78
docs(api): elaborate on fill vs type (#1608) 2020-03-31 13:42:07 -07:00
Andrey Lushnikov eabba567bc
docs(api.md): clarify jshandle.getProperties() method (#1594)
Fixes #1592
2020-03-30 16:16:28 -07:00
Max Schmitt d9c064bbab
docs(showcases): fixed dead link to e2e boilerplates (#1591)
Closes #1589
2020-03-30 11:53:15 -07:00
Stuart Lang a007caef5c
Fixed small typos (#1588) 2020-03-30 09:03:13 -07:00
Dmitry Gozman bce8fc1343
feat(selectors): allow running selectors in main world (#1533) 2020-03-25 20:59:48 -07:00
Dmitry Gozman 6ee7852f0f
chore: update release guide and helper script (#1521) 2020-03-25 13:15:29 -07:00
MeiK c7b3744b3b
docs(api.md): fix typo (#1529) 2020-03-24 20:10:58 -07:00
Andrey Lushnikov dc7d221722
chore: bump version to v0.12.1-post (#1516) 2020-03-24 12:08:02 -07:00
Andrey Lushnikov a7ca2fef09
chore: mark version v0.12.1 (#1515) 2020-03-24 11:28:07 -07:00
Dmitry Gozman 1084008f1a
chore: update release guide 2020-03-24 10:53:36 -07:00
Dmitry Gozman a4dca79969
chore: update release guide 2020-03-24 10:50:23 -07:00
Dmitry Gozman ed6e0d5513
chore: bump version to v0.12.0-post (#1512) 2020-03-24 10:46:35 -07:00
Dmitry Gozman 08b94ee67b
chore: mark version v0.12.0 (#1497) 2020-03-24 10:40:02 -07:00
Arjun Attam 8bf83396a0
docs(showcase): updated showcase (#1481) 2020-03-24 09:09:45 -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
Max Schmitt 5a93872063
docs: add upload keyword to filechooser (#1496) 2020-03-23 19:47:29 -07:00
Dmitry Gozman bfb24e6f55
chore: update releasing guide (#1503) 2020-03-23 18:11:59 -07:00
Joel Einbinder 5bf9f223db
fix(docs): consider argument to be optional in evaluate (#1500) 2020-03-23 17:22:10 -07:00
Dmitry Gozman 05dc89b978
chore: update release guide (#1495) 2020-03-23 14:55:26 -07:00
Dmitry Gozman de0a2d1081
api(waitForLoadState): move waitUntil to be a first parameter (#1490) 2020-03-23 13:51:11 -07:00
Andrey Lushnikov a74e23a257
feat: support PLAYWRIGHT_GLOBAL_INSTALL=1 env variable (#1470)
You can install playwright with

```
PLAYWRIGHT_GLOBAL_INSTALL=1 npm i playwright
```

to make it use a single shared location for all browser
downloads.

Fixes #1102
2020-03-23 12:49:53 -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
Arjun Attam a570290740
docs(examples): update main readme to point to examples + add a file uploads example (#1484) 2020-03-23 10:39:43 -07:00
Arjun Attam 9e9584441c
docs(troubleshooting): add dependencies for firefox and webkit (#1461) 2020-03-21 17:58:08 -07:00
Arjun Attam 6df17c69e2
docs(examples): setup get started with examples guide (#1441) 2020-03-21 12:05:37 -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 f1d97b0466
chore(docs): remove remaining mentions of Chromium targets (#1435) 2020-03-19 20:25:31 -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
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
Joel Einbinder 741e2d19d6
fix(docs): lint and fix all internal links in api.md
We have had a lot of churn in the api, which has caused a lot of our links to break.
2020-03-18 15:34:53 -07:00
Arjun Attam 045277d5cd
docs(chore): fix link in troubleshooting (#1422) 2020-03-18 09:41:52 -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
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 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
Denis Sikuler 245c1fad5d
fix(docs): a typo in showcase (#1361) 2020-03-12 11:20:29 -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
Pavel Feldman b43f33f4d3
api(review): misc changes to API. (#1356) 2020-03-11 18:10:48 -07:00
Kevin Wang b3f87e8360
docs(api.md): Fix incorrect link to PageEvent (#1353)
Minor typo :)
2020-03-11 17:51:19 -07:00
Dmitry Gozman c1ef683373
api: remove waitForLoadState() in favor of PageEvent.page(options) (#1323) 2020-03-11 14:46:52 -07:00
Andrey Lushnikov 13c2f6571b
docs(selectors): clarify selector conversions 2020-03-11 11:39:44 -07:00
Dmitry Gozman 23cf3be828
api: make request.frame() non-null (#1319) 2020-03-10 11:39:35 -07:00
Dmitry Gozman ea6978a3d8
api(popups): expose BrowserContext.route() (#1295) 2020-03-09 21:02:54 -07:00
Hugo Dias e2a0d61606
docs(showcase): Add playwright-test to showcase (#1283)
This tool runs mocha, tape and benchmark.js scripts inside browsers with playwright.
2020-03-09 18:39:17 -07:00
Dmitry Gozman eb2ca70955
api(route): allow fulfilling with a file path (#1301) 2020-03-09 16:12:00 -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 3c35d7b058
api(waitFor): click(waitFor) -> click(force) (#1275) 2020-03-06 16:24:21 -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