Commit Graph

8 Commits

Author SHA1 Message Date
Andrey Lushnikov
8a8076c15b Rename Page.Events.ConsoleMessageAdded -> Page.Events.ConsoleMessage
This patch:
- renames ConsoleMessageAdded into ConsoleMessage for the sake of
  clarity
- adds a test to cover basic functionality
2017-05-13 11:05:54 -07:00
Andrey Lushnikov
ab6a96a991 Fix License header of certain examples
Certain examples rely extensively on the originating PhantomJS
examples.

This patch fixes license headers of these examples to mention
PhantomJS authors.
2017-05-12 16:48:02 -07:00
Andrey Lushnikov
62e68159f4 Re-implement phantom's examples/features.js in puppeteer api. 2017-05-12 14:57:55 -07:00
Andrey Lushnikov
68a24b7336 Implement phantom's detecsniff example with puppeteer API. 2017-05-12 14:23:33 -07:00
Andrey Lushnikov
c3a3bfe1d2 Implement Page.evaluateOnInitilized method
The PhantomJS has a similar callback called onInitialized. This
callback passes control to the automation script when the page
gets initialized.

To precisely implement this functionality atop of puppeteer,
and since puppeteer controller script lives in a separate process to
the page, we need an ability to pause page at the moment of
initialization. For now, we are not able to do this.

However, oftentimes clients want to evaluate certain code in
page at the point of page initialization. This patch implements
this capability with the Page.evaluateOnInitilized method call.

This patch also re-implements phantom's unrandomize.js example
with the puppeteer API. This is serves an illustration purpose
for the page.evaluateOnInitilized callback.
2017-05-12 14:13:40 -07:00
Andrey Lushnikov
073f6409d8 Add colorwheel.js puppeteer example
This patch re-implements PhantomJS colorwheel example with
puppeteer API.
2017-05-12 11:14:32 -07:00
Andrey Lushnikov
7bf3684039 Update examples/screenshot.js to use Page.saveScreenshot 2017-05-12 11:12:32 -07:00
Andrey Lushnikov
2cda8c18d1 Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00