mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
readme: start of useful debugging tips (#352)
* readme: start of useful debugging tips * feedback
This commit is contained in:
parent
500b956c84
commit
ae3fedfa91
22
README.md
22
README.md
@ -102,6 +102,26 @@ Puppeteer creates its own Chromium user profile which it **cleans up on every ru
|
||||
|
||||
Explore the [API documentation](docs/api.md) and [examples](https://github.com/GoogleChrome/puppeteer/tree/master/examples/) to learn more.
|
||||
|
||||
## Debugging tips
|
||||
|
||||
1. Turn off headless mode - sometimes it's useful to turn see what the browser is
|
||||
displaying. Instead of launching in headless mode, launch a full version of
|
||||
Chrome using `headless: false`:
|
||||
|
||||
```js
|
||||
const browser = await puppeteer.launch({headless: false});
|
||||
```
|
||||
|
||||
1. Slow it down - the `slowMo` option slows down Puppeteer operations by the
|
||||
specified amount of milliseconds. It's another way to help see what's going on.
|
||||
|
||||
```js
|
||||
const browser = await puppeteer.launch({
|
||||
headless: false,
|
||||
slowMo: 250 // slow down by 250ms
|
||||
});
|
||||
```
|
||||
|
||||
## Contributing to Puppeteer
|
||||
|
||||
Check out [contributing guide](https://github.com/GoogleChrome/puppeteer/blob/master/CONTRIBUTING.md) to get an overview of Puppeteer development.
|
||||
@ -114,7 +134,6 @@ Look for `chromium_revision` in [package.json](https://github.com/GoogleChrome/p
|
||||
|
||||
Puppeteer bundles Chromium to ensure that the latest features it uses are guaranteed to be available. As the DevTools protocol and browser improve over time, Puppeteer will be updated to depend on newer versions of Chromium.
|
||||
|
||||
|
||||
#### Q: What is the difference between Puppeteer, Selenium / WebDriver, and PhantomJS?
|
||||
|
||||
Selenium / WebDriver is a well-established cross-browser API that is useful for testing cross-browser support.
|
||||
@ -123,7 +142,6 @@ Puppeteer works only with Chrome. However, many teams only run unit tests with a
|
||||
|
||||
Puppeteer uses the latest versions of Chromium.
|
||||
|
||||
|
||||
#### Q: Who maintains Puppeteer?
|
||||
|
||||
The Chrome DevTools team maintains the library, but we'd love your help and expertise on the project!
|
||||
|
Loading…
Reference in New Issue
Block a user