Commit Graph

400 Commits

Author SHA1 Message Date
Eric Bidelman
0a3dd4e727 readme: faq entries ()
* readme: faq entries

* Feedback
2017-08-14 17:55:40 -07:00
Andrey Lushnikov
5154d72342 Add separate README.md to phantom_shim ()
The PhantomShim specific readme should be a better explanation of
what phantom shim is and is not.
2017-08-14 10:13:48 -07:00
Andrey Lushnikov
13e0965407 Move emulation documentation under page.emulate method. () 2017-08-13 00:47:01 -07:00
Andrey Lushnikov
4269f6a1bb Roll chromium to r493985 ()
This patch:
- rolls chromium to r493985
- migrates Browser.version() puppeteer method to use newly added
  Browser.getVersion() protocol method

References 
2017-08-12 22:04:39 -07:00
Andrey Lushnikov
3ee4951506 [DEBUG] add "session" namespace to trace target protocol messages () 2017-08-11 17:47:33 -07:00
Jonathan Garbee
56b0d8722b Default value for property on dialog () 2017-08-11 17:24:46 -07:00
Andrey Lushnikov
4551afc6dc Introduce new interception API ()
This patch introduces new interception API, via killing InterceptedRequest and giving the `abort` and `continue` methods to the Request object.
2017-08-11 17:24:31 -07:00
JoelEinbinder
d793e51a9a Add a test that uses Modernizr to detect touch ()
Add a test that uses Modernizr to detect touch
2017-08-11 13:59:23 -07:00
Andrey Lushnikov
dbac6788ae Plumb default prompt value to the dialog ()
This patch:
- plumbs default prompt value to the dialog
- enables one more phantom test
2017-08-11 12:17:43 -07:00
JoelEinbinder
53baed6af6 Google search example ()
Add google search example.

References 
2017-08-11 01:41:42 -07:00
JoelEinbinder
497baf0198 Roll chromium to r493673 ()
Mouse events are no longer racy. Enabling touch no longer converts all mouse events into touches. Promises in destroyed execution contexts are rejected immediately.
2017-08-11 01:21:02 -07:00
Andrey Lushnikov
b8dbd28b8c Refer to the upstream bug ()
The issue  is a protocol inconsistency which happens only
in case of HTTPS error. This patch starts refering to the
upstream bug instead of puppeteer issue.

Closes .
2017-08-11 01:07:33 -07:00
Andrey Lushnikov
6347a049ba Rename Page.setInPageCallback into Page.addBinding ()
This seems to be a much better name which is actually used for a similar
purposes in chromium/v8.
2017-08-10 21:44:49 -07:00
Andrey Lushnikov
25465525c1 Fix full page screenshot example ()
This patch aligns the example with our style in `examples/` folder, and also starts to use page.goto instead of page.navigate
2017-08-10 21:44:27 -07:00
Pavel Feldman
3a7741a172 Introduce page.emulate convenience wrapper ()
This patch:
- introduces Page.emulate convenience wrapper
- adds a screenshot-fullPage.js example
2017-08-10 18:42:30 -07:00
Andrey Lushnikov
7936be43f7 Update README.md
Remove typo in link description.
2017-08-10 18:36:02 -07:00
Eric Bidelman
1ee47d868b Doc polish. Example consistency () 2017-08-10 18:31:54 -07:00
JoelEinbinder
0a55345060 Test touch emulation more completely () 2017-08-10 18:25:56 -07:00
Eric Bidelman
8ccd10bfa2 Docs: add default networkIdleTimeout value () 2017-08-10 14:49:34 -07:00
Andrey Lushnikov
e1d8a3781e Rename Page.navigate into Page.goto ()
Fixes .
2017-08-10 00:02:10 -07:00
Andrey Lushnikov
fe06c896eb Roll chromium to 492629 ()
This patch
- rolls chromium to 492629
- migrates connection establishing to use browser target. This migration means
  that now we have a single websocket connection to browser (implemented
  in Connection class). A connection to a particular target is
  incapsulated in a new Session class.
2017-08-09 16:14:00 -07:00
Andrey Lushnikov
29adc5dc80 [examples] get rid of old examples
This patch:
- removes old phantom-js examples
- adds an example to load page without images

References 
2017-08-08 00:44:15 -07:00
JoelEinbinder
104455c75a Remove unrandomize example () 2017-08-07 23:50:25 -07:00
Andrey Lushnikov
34b0095c10 Make interception work with redirects ()
This patch:
- changes interception API so that it better aligns with what we'd like to see
  in 
- fixes the issue with redirect interception

Fixes .
2017-08-07 17:48:52 -07:00
Andrey Lushnikov
e1c5b8d244 Aborted network requests should use protocol's "Failed" status ()
This patch starts using "Failed" command for request interception instead of
"Aborted".

The "Aborted" status also has a side-effect of cancelling the navigation, so
there will be no error on the page and form puppeteer's standpoint, the navigation
will never complete.
2017-08-07 15:13:17 -07:00
Andrey Lushnikov
4eedc10cfa Add pdf.js example ()
add pdf.js example
2017-08-07 14:55:45 -07:00
Andrey Lushnikov
4f5cad921e [doc] Remove mention of broken javascript dialogs from api.md () 2017-08-04 01:12:18 -07:00
Andrey Lushnikov
7888a37a3d Page.pdf should accept case-insensetive page format () 2017-08-04 01:01:10 -07:00
Andrey Lushnikov
00196e6cdc Fix setContent to actually await the inner evaluation () 2017-08-04 00:23:04 -07:00
Andrey Lushnikov
af2b790227 Add test to reproduce handing touch events ()
References .
2017-08-03 22:51:51 -07:00
Andrey Lushnikov
13327f3303 Add test which reproduces the hanging mouse.click() behavior ()
This patch adds a disabled test to reproduce the mouse.click() hanging
bug.

References .
2017-08-03 22:10:06 -07:00
Andrey Lushnikov
2d650d0301 Introduce CHROME env variable for tests ()
This patch adds `CHROME` env variable which allows to
specify custom executable path to run tests.
2017-08-03 21:38:55 -07:00
Andrey Lushnikov
a4c0d58204 Fix tests in non-headless mode ()
The chrome-devtools://devtools/bundled/inspector.html is a perfectly
valid url in headful chromium, so we should pick another one for test
to work (and for the navigation inside the test to fail).
2017-08-03 19:11:41 -07:00
Pavel Feldman
82fbb268db Do not count inflight requests explicitly - use set. () 2017-08-03 16:30:55 -07:00
Andrey Lushnikov
20ba447689 [DEBUG] Trace only those events which have listeners. ()
The `DEBUG=*page npm run unit` is too verbose due to events spamming
the console.

This patch starts tracing emitted events only if there are any
listeners.
2017-08-03 15:20:31 -07:00
Andrey Lushnikov
d8dd6ea140 Add more tests to cover Page.pdf() method () ()
This patch adds sanity tests to make sure Page.pdf() produces
sane results.

Fixes .
2017-08-03 14:10:52 -07:00
Andrey Lushnikov
fc22b5d888 Revert "Add more tests to cover Page.pdf() method ()" ()
This reverts commit 403362eaf1.
2017-08-03 13:42:38 -07:00
Andrey Lushnikov
403362eaf1 Add more tests to cover Page.pdf() method ()
This patch adds sanity tests to make sure Page.pdf() produces
sane results.

Fixes .
2017-08-03 13:37:20 -07:00
Andrey Lushnikov
31224392bb Kill page.$ and page.$$ functions ()
page.$ and page.$$ conflicts with our ideas about element handles.

This patch removes functions in favor of future implementation.

References 
2017-08-03 13:35:31 -07:00
Eric Bidelman
211c372a3a EditorConfig: 2 space indent ()
This patch updates editor config to use 2 spaces
2017-08-03 09:50:08 -07:00
Andrey Lushnikov
6c163122bf Update default viewport size to be 800px by 600px ()
This patch updates default viewport size to be 800px by 600px.
This comes handy when observing scripts running in non-headless mode.
2017-08-02 15:47:00 -07:00
JoelEinbinder
984e011cf0 Move path option into tracing.start ()
This consolidates all the tracing options in the tracing.start()
2017-08-02 15:41:05 -07:00
JoelEinbinder
315c388f4d Enable dialog tests ()
* Enable dialog tests
closes 

* dismiss dialog test
2017-08-02 15:32:20 -07:00
JoelEinbinder
e6d8fca7cd Lint examples, again () 2017-08-02 15:03:26 -07:00
JoelEinbinder
c32df08e4c Update jsdoc from Tracing patch ()
This fixes the comments @a1ph on  about JSDOC.
2017-08-02 15:02:41 -07:00
JoelEinbinder
cb471e3666 Ignore package-lock.json ()
pacakge-lock.json seems to be buggy now, with different OS giving different results. 
See https://github.com/npm/npm/issues/17749

We have been having trouble keeping it up to date with yarn.lock. It doesn't give us a big win, because it is ignored if you install the package from npm.

This patch removes package-lock.json and starts ignoring it.
2017-08-02 14:18:14 -07:00
Andrey Lushnikov
3f0306a4d0 [tests] Await all page.evaluate() calls in all tests ()
If the evaluation is not awaited for, then the page might be
closed before it's finished, and an exception will be thrown.
2017-08-02 13:24:34 -07:00
Andrey Lushnikov
dbe8660082 Roll chromium to r491334 ()
This patch rolls chromium to r491334

This revision includes @pavelfeldman changes to make dialogs
work in headless.
2017-08-02 13:12:44 -07:00
JoelEinbinder
5d647bf1fa Use const a lot fo places () 2017-08-02 12:06:47 -07:00
JoelEinbinder
bd72e40e73 Introduce page.tracing ()
This patch introduces page.tracing, which allows to start and stop
trace recording for a page. The trace could be then saved to file.
2017-08-02 10:45:11 -07:00