This patch:
- fixes a typo in documentation linter, which resulted in only
certain method arguments being linted.
- adds missing arguments to the documentation
References #14.
This patch introduces a general Documentation.diff method, which
produces a diff of two documentations.
With this, the patch teaches documentation linter to lint method arguments.
References #14.
This patch remove remoteDebuggingPort option. Instead, browser
is launched with '--remote-debugging-port=0' flag, letting browser
to pick any port. The puppeteer reads the port number from the
browser's stderr stream.
This change cuts average browser start time from 300ms to 250ms
on my machine. This happens since puppeteer doesn't have to probe
network once every 100ms, waiting for the remote debugging server to
instantiate.
Fixes#21.
This patch changes Page.navigate API:
- Page.navigate now resolves to the main page response
- Page.navigate throws errors if there's no main page response,
e.g. in case of SSL errors, max navigation timeout,
or invalid url.
This patch also adds httpsServer with a self-signed certificates
for the testing purposes.
Fixes#10.
The command runs the puppeteer testsuite with the '--inspect-brk' node
flag. This makes it possible to connect to the testsuite with
Chrome DevTools and debug it.
Fixes#57.
This patch adds browser.stdout and browser.stderr streams.
These streams allow to get the browser instance output, e.g.
```js
browser.stderr.pipe(process.stdout);
```
This patch implements documentation linter, which leaves under `test/doclint`
folder.
The documentation linter works like this:
1. Parse javascript source code with esprima and construct a "documentation" out of source code
2. Generate HTML out of `api.md` and traverse the HTML with puppeteer.
3. Make sure javascript aligns nicely with HTML
The documentation linter adds the following commands:
- `yarn doc` - to test that documentation covers all the relevant apis
- `yarn generate-toc` - to update the table-of-contents for the `api.md`
It turned out that server.close() does not shutdown server but
stops it from accepting *new* connections.
It's our responsibility to destroy all the current connections,
if any.
This line within `injectFile` wasn't doing much of anything:
```js
let expression = fs.readFile(filePath, 'utf8', (err, data) => callback({err, data}));
```
* That's fixed.
* A path error in examples/features.js is fixed.
* Test added for injectFile.
This patch implements frame switching api in phantom shim and
passes the relevant test.
This makes sure that puppeteer's frames API is comprehensive.
Fixes#4.
This patch improves phantom_shim:
- introduce WebPage.loading/WebPage.loadingProgress
- improve compatibility of WebPage.onInitialized. This allows to
pass phantomjs tests, even though the implementation is hacky.
- teach PhantomResponse about "stage" state which could be either
"start" or "end"
- unskip a bunch of phantom webpage tests:
- webpage/change-request-encoded-url
- webpage/loading.js
- webpage/long-running-javascript.js
- webpage/modify-header.js
- webpage/on-initialized.js
- webpage/remove-header.js
This patch:
- drops Request dependency on NetworkManager
- drops Response dependency on NetworkManager
- drops requestIds from Request and Response objects
This patch implements NetworkManager, which encapsulates all the
interaction with Network domain.
The NetworkManager also uses partial implementation of Request and
Response classes, defined in the Fetch API specification.
References #26
This patch:
- Changes network idle promise to wait for 2 or fewer network requests for at least idleTime (defaults to 5s) before resolving.
- Adds timer cleanup to failure navigation case.
- Adds handling of webSocketClosed.
- Ignores unrecognized requestIds to avoid negative inflight requests.
References #10
This patch introduces the 'request' event which is fired when
page has initiated a request.
The event dispatches an instance of Request class.
References #26.
This patch does a step towards Fetch API:
- implements Request object to some extend. The Request object will be
sent in RequestWillBeSent event.
- implements InterceptedRequest which extends from Request and allows
for request modification. The InterceptedRequest does not
conform to Fetch API spec - there seems to be nothing related to
amending in-flight request.
- adds test to make sure that request can change headers.
References #26