Commit Graph

40 Commits

Author SHA1 Message Date
Mathias Bynens
eddb23b521
chore: update URLs (#5185) 2019-11-26 13:12:25 +01:00
Maja Frydrychowicz
c5a72e9887 feat(launcher): add option to run Puppeteer with different browsers (#5137)
* feat: Set which browser to launch via PUPPETEER_PRODUCT

This change introduces a PUPPETEER_PRODUCT environment
variable as a first step toward using Puppeteer with
many different browsers. Setting PUPPETEER_PRODUCT=firefox, for
example, enables Firefox-specific Launcher settings.

The state is also exposed as `puppeteer.product` in the API
to support adding other product-specific behaviour as needed.

The bulk of the change is a refactoring in Launcher
to decouple generic browser start-up from product-specific
configuration.

Respecting the puppeteer-core restriction for PUPPETEER_
environment variables, lazily instantiate the Launcher
based on a `product` Puppeteer.launch option, if available.

* test: Distinguish Juggler unit tests from Firefox

The funit script is renamed to fjunit (j for Juggler, which is
used only by the experimental puppeteer-firefox package.

In contrast, the funit script now refers to running Puppeteer
unit tests against the main puppeteer package with Firefox.
To do so with Firefox Nightly, run:

`BINARY=path/to/firefox npm run funit`

A number of changes in this patch make it easier to run
Puppeteer unit tests in Mozilla's CI.
2019-11-26 10:23:19 +01:00
Connor Clark
d17708ba1f fix(types): publish protocol types to npm (#5174)
Co-Authored-By: Mathias Bynens <mathias@qiwi.be>
2019-11-15 20:19:08 -08:00
Mathias Bynens
aaa904d293 docs(contributing): clarify release process 2019-10-24 17:51:51 +02:00
Mathias Bynens
25061694a9
docs(contributing): mention manual docs/api updates (#5023)
Ref. #5016.
2019-10-15 11:11:34 +02:00
Mathias Bynens
fff2737e8a doc(contributing): clarify release instructions (#4940) 2019-09-13 19:59:14 -07:00
Mathias Bynens
fca9d4585f docs(CONTRIBUTING.md): clarify release process (#4923)
After bumping the package.json version number, maintainers should run `npm run doc` to automatically update README.md and docs/api.md accordingly.
2019-09-10 13:15:45 -07:00
Mathias Bynens
97ff359b0e docs(CONTRIBUTING.md): fix some typos (#4917)
As someone who's new to the project, I read the contributing guide and spotted some things that confused me. Hopefully this patch helps to reduces the confusion for others!
2019-09-09 15:52:52 -07:00
Andrey Lushnikov
835e8849fd
feat(testrunner): add new testrunner options (#4718)
This patch adds new TestRunner options:
- `disableTimeoutWhenInspectorIsEnabled` - disable test timeout if
  testrunner detects enabled inspector.
- `breakOnFailure` - if testrunner should terminate test running on
  first test failure
2019-07-17 10:32:37 -07:00
Andrey Lushnikov
e1432cc08a
docs(contributing): update commit message example (#4560)
Fix #4559
2019-06-10 01:45:04 -07:00
Andrey Lushnikov
ba7d0a9db5
docs(contributing): add dist-tag management (#4423)
- Add npm dist-tag management
- Drop forced chromium builds
2019-05-18 12:48:17 +03:00
Andrey Lushnikov
080b80975f
docs(contributing): add instructions to build Chromium revisions (#4246) 2019-04-04 15:34:41 -07:00
Andrey Lushnikov
5ebfe1a0dc
docs(contributing): remove the --filter note (#3342)
Fixes #3340
2018-10-03 17:25:20 -07:00
Andrey Lushnikov
81d42c4688
feat: prepare for publishing puppeteer-core (#3047) 2018-08-08 15:14:23 -07:00
Andrey Lushnikov
90833352ba docs(contributing): add section about releasing to NPM (#2695) 2018-06-07 09:38:49 -07:00
Yaniv Efraim
41ccd0bded chore(docs): remove old and non relevant function usage (#2623) 2018-05-29 15:25:20 -07:00
Matej Plavevski
de82b87cfa docs(documentation) capitalize and end sentences (#2537) 2018-05-16 14:55:27 -07:00
Drew Diamantoukos
b275e66594 chore: Spelling and Markdown Consistency (#1998)
- Adding missing language tags to markdown code blocks.
- Fixed various spelling mistakes my IDE complained to me about.
2018-02-08 22:59:46 -05:00
Andrey Lushnikov
070243e4b6
docs(CONTRIBUTING): update contributing.md (#1973) 2018-02-08 00:59:11 -05:00
Thomas Broadley
efbc52a4b7 docs: fix typos (#1647) 2017-12-27 20:04:11 -07:00
Andrey Lushnikov
e6725e15af
tests: drop jasmine test runner (#1519)
This patch introduces a tiny test runner to run puppeteer tests.
The test runner is self-container and allows parallel (wrt IO) test execution.
It will also allow us to split tests into multiple files if necessary.

Comparing to the jasmine, the testrunner supports parallel execution, properly
handles "unhandled promise rejection" event and signals.

Comparing to ava/jest, the testrunner doesn't run multiple node processes,
which makes it simpler but sufficient for our goals.
2017-12-07 16:37:22 -08:00
Andrey Lushnikov
bc7f211474
docs(contributing): define semantic commit message rules (#1233)
Semantic commit messages drastically simplify preparation of releases.
2017-11-01 14:05:19 -07:00
Paul Irish
3365562b2b Add DEBUG=* debugging guide to readme (#622) 2017-08-30 18:41:45 -04:00
JoelEinbinder
bd5b4fe963 Phantom shim mention (#552)
Remote remaining mentions of PhantomShim
2017-08-25 16:30:48 -07:00
Vse Mozhet Byt
8c245eef4e doc: fix code examples in CONTRIBUTING.md (#402)
* fix `ReferenceError: Invalid left-hand side in assignment` errors

* add variable declarations

* unify spacing with examples in the README.md
2017-08-19 17:33:26 -07:00
JoelEinbinder
59256ee5ba Capitalize Chromium and Puppeteer (#263) 2017-08-15 00:14:12 -07:00
Andrey Lushnikov
13e8580a34 Use puppeteer.launch instead of browser constructor (#255)
This patch:
- split browser launching logic from Browser into `lib/Launcher.js`
- introduce `puppeteer` namespace which currently has a single `launch`
  method to start a browser

With this patch, the browser is no longer created with the `new
Browser(..)` command. Instead, it should be "launched" via the
`puppeteer.launch` method:

```js
const puppeteer = require('puppeteer');
puppeteer.launch().then(async browser => {
  ...
});
```

With this approach browser instance lifetime matches the lifetime of
actual browser process. This helps us:
- remove proxy streams, e.g. browser.stderr and browser.stdout
- cleanup browser class and make it possible to connect to remote
  browser
- introduce events on the browser instance, e.g. 'page' event. In case
  of lazy-launching browser, we should've launch browser when an event
  listener is added, which is unneded comlpexity.
2017-08-14 18:08:06 -07:00
Andrey Lushnikov
3ee4951506 [DEBUG] add "session" namespace to trace target protocol messages (#249) 2017-08-11 17:47:33 -07:00
Eric Bidelman
1ee47d868b Doc polish. Example consistency (#233) 2017-08-10 18:31:54 -07:00
Andrey Lushnikov
e1d8a3781e Rename Page.navigate into Page.goto (#232)
Fixes #228.
2017-08-10 00:02:10 -07:00
Andrey Lushnikov
2d650d0301 Introduce CHROME env variable for tests (#205)
This patch adds `CHROME` env variable which allows to
specify custom executable path to run tests.
2017-08-03 21:38:55 -07:00
JoelEinbinder
2acfec0989 Slow mode (#173)
This patch introduces a `slowMo` browser option which
slows down puppeteer operations. Comes handy for debugging
scripts.
2017-07-31 18:47:56 -07:00
Andrey Lushnikov
0f3a0dcbfc Update CONTRIBUTING.md and README.md
This patch:
- fixes wording in a few places
- fixes installation step on the README.md
2017-07-29 00:34:37 -07:00
Andrey Lushnikov
47a0366b16 Fix typo in coverage
This patch:
- fixes typo in coverage
- enables coverage on Travis CI

References #50.
2017-07-27 16:35:17 -07:00
Andrey Lushnikov
cfc6a6ab38 Update CONTRIBUTING.md
Fixes #146.
2017-07-27 11:28:35 -07:00
Andrey Lushnikov
e33a8f818c Support HEADLESS env variable for unit tests
This patch makes it possible to run unit tests in non-headless
mode with the following command:

```
HEADLESS=false npm run unit
```
2017-07-19 19:36:22 -07:00
Andrey Lushnikov
55acae40fd Introduce DEBUG module which traces public API calls
This patch improves on DEBUG module to trace all puppeteer's
public API calls.

References #89.
2017-07-18 21:06:03 -07:00
Andrey Lushnikov
0414dfa98b Introduce DEBUG module
This patch re-introduces the DEBUG module to expose some of
the puppeteer's internals.

Currently, only the protocol message communication is exposed under
the 'puppeteer:protocol' namespace.
2017-07-17 15:15:07 -07:00
Andrey Lushnikov
1ebf3aa5aa update CONTRIBUTING.md 2017-06-21 14:11:52 -07:00
Andrey Lushnikov
2cda8c18d1 Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00