Commit Graph

318 Commits

Author SHA1 Message Date
Radu Aron
ec8e40f1cb feat(Page): Add global navigation timeout setting (#1728)
This patch introduces `page.setDefaultNavigationTimeout` method to override the 
default 30 seconds navigation timeout.

Fixes #1514
2018-01-10 13:04:01 -08:00
Octavian Cioaca
3985dee54e docs(API): add more explicit examples for page.evaluate (#1711) 2018-01-09 23:05:52 -08:00
yujiosaka
c29822d663 feat: Attribute network requests to frames (#1646)
This patch introduces `request.frame()` method that returns the frame that
initiated request.

Fixes #1579
2018-01-09 18:47:21 -08:00
Kamakura Masaya
8c392b7ee8 docs(api.md): add missing parentheses after page.mainFrame (#1738) 2018-01-08 17:20:02 -08:00
yujiosaka
8e9c54a789 feat: introduce browser.userAgent() (#1716)
The patch introduces browser.userAgent() method to retrieve
default browser user agent.

Fixes #1706.
2018-01-05 10:14:30 -08:00
JoelEinbinder
05b1aca21e feat: support JSHandles for page.waitFor* calls (#1712)
This patch:
- teaches page.waitFor* methods to accept JSHandles
- starts returning JSHandles from page.waitFor* calls. 

BREAKING CHANGE: this patch starts allocating `JSHandle`/`ElementHandle` instances for every call to `page.waitFor*` functions. These handles should be disposed manually to avoid memory consumption.

Fixes #1703, fixes #1654, fixes #1724.
2018-01-04 14:49:13 -08:00
Andrey Lushnikov
0a498bae3a
docs: update api.md
This patch clarifies when the "disconnected" event is emitted
and emphasizes the difference between Chromium and browser.

References #1589.
2018-01-04 02:27:57 -08:00
Andrey Lushnikov
24354a4879
feat: implement CSS Coverage (#1714)
This patch adds two new methods to the `page.coverage` namespace:
- `page.coverage.startCSSCoverage()` - to initiate css coverage
- `page.coverage.stopCSSCoverage()` - to stop css coverage

The coverage format is consistent with the JavaScript coverage.
2018-01-03 18:21:40 -08:00
JoelEinbinder
f183664d0f feat: rename page.xpath into page.$x, return an array of elements (#1713)
Fixes #1705.
2018-01-03 15:37:08 -08:00
Andrey Lushnikov
d062381978
feat: Implement JavaScript Coverage (#1673)
This patch introduces a new `page.coverage` namespace with two methods:
- `page.coverage.startJSCoverage` to initiate JavaScript coverage
  recording
- `page.coverage.stopJSCoverage` to stop JavaScript coverage and get
  results
2018-01-02 19:53:53 -08:00
Andrey Lushnikov
83fb29d4e7
docs: use less confusing synonym
This change was suggested in #1636.
2017-12-27 19:35:14 -08:00
JoelEinbinder
bf3e0cca57 docs: add missing session cookie property to api.md (#1672)
The session value is returned from the protocol, but not accepted as a cookie parameter.

Fixes #980.
2017-12-27 19:58:57 -07:00
JoelEinbinder
8a40cd5eef feat(Launcher): allow the default arguments to be overridden (#1623)
This patch:
- adds `puppeteer.defaultArgs()` method to get default arguments that are used to launch chrome
- adds `ignoreDefaultArgs` option to `puppeteer.launch` to avoid using default puppeteer arguments

Fixes #872
2017-12-19 17:51:21 -08:00
Audrius Jakumavicius
f8040cb2a2 feat(pdf): add headerTemplate and footerTemplate to available PDF options (#1625)
This patch allows specifying header and footer templates for PDF printing.

Fixes #373.
2017-12-19 16:54:34 -08:00
JoelEinbinder
60ba8c3af9 feat: add page.xpath (#1620)
This patch adds xpath support with the following methods:
- page.xpath
- frame.xpath
- elementHandle.xpath

Fixes #537
2017-12-19 16:23:45 -08:00
Andrey Lushnikov
b73737302a
fix: convert all getters to methods (#1621)
The patch converts all the getters in the codebase into the methods.
For example, the `request.url` getter becomes the `request.url()`
method.

This is done in order to unify the API and make it more predictable.
The general rule for all further changes would be:
- there are no getters/fields exposed in the api
- the only exceptions are "namespaces", e.g. `page.keyboard`

Fixes #280.

BREAKING CHANGE:
This patch ditches getters and replaces them with methods throughout
the API. The following methods were added instead of the fields:
- dialog.type()
- consoleMessage.args()
- consoleMessage.text()
- consoleMessage.type()
- request.headers()
- request.method()
- request.postData()
- request.resourceType()
- request.url()
- response.headers()
- response.ok()
- response.status()
- response.url()
2017-12-18 17:05:57 -08:00
Karl Brown
63f7e38077 docs(README.md): Update docs to more clearly differentiate between Chromium and Chrome (#1574)
This patch clarifies the documentation to more clearly note that Puppeteer works with both Chromium (by default)
and Chrome.

Fixes #1516
2017-12-14 19:09:48 -08:00
Andrey Lushnikov
4eaf52fa1d
feat(Browser): introduce browser.process() variable (#1581)
This patch adds a `browser.process()` getter to expose the child process
with running browser.

Fixes #1539.
2017-12-11 12:11:12 -08:00
Trent Willis
696f59e890 docs(api.md): Note that Browser and Page extend from EventEmitter (#1541)
Adds notes to the API documentation that Browser and Page classes
are EventEmitters. Provides an example of using `.once` for Page.

Fixes #1231
2017-12-05 23:53:27 -08:00
Slohmes
5a6488883a feat(Tracing): allow custom tracing categories (#1439)
This patch adds `categories` option to the `page.tracing.start` method
that allows to override default tracing categories. 

References #1300, #854
2017-12-03 18:36:34 -08:00
Trent Willis
770c17b2ea feat(Frame): implement frame.content and frame.setContent methods (#1447)
This refactors the page.content and page.setContent methods to be defined on the Frame class. This allows access from the Page still but also on all frames.

Fixes #754
2017-11-23 05:44:33 +03:00
Andrey Lushnikov
3b60ad1c39
doc(api.md): ElementHandle.boundingBox() returns a promise (#1437) 2017-11-21 10:13:44 +03:00
Andrey Lushnikov
6512ce768d
fix(Frame): postpone evaluations until execution context gets created (#1415)
In Blink, frames don't necesserily have execution context all the time.
DevTools Protocol precisely reports this situation, which results in
Puppeteer's frame.executionContext() being null occasionally.

However, from puppeteer point of view every frame will have at least a
default executions context, sooner or later:

- frame's execution context might be created naturally to run frame's
  javascript
- if frame has no javascript, devtools protocol will issue execution
  context creation

This patch builds up on this assumption and makes frame.executionContext()
to be a promise.
As a result, all the evaluations await for the execution context to be created first.

Fixes #827, #1325

BREAKING CHANGE: this patch changes frame.executionContext() method to return a promise.
To migrate onto a new behavior, await the context first before using it.
2017-11-18 16:27:52 -08:00
Md. Abu Taher
48ccf1e9f4 doc(api.md): add evaluateOnNewDocument examples (#1202)
Fixes #1201.
2017-11-17 10:34:20 -08:00
Andrey Lushnikov
90ca007367
fix(Launcher): handle SIGHUP signal (#1405)
The SIGHUP signal is sent whenever the controlling terminal is closed.

On Windows, SIGHUP is emulated by libuv, and will be the only signal we
receive before the application will be terminated.

This patch starts handling SIGHUP in the same way we handle SIGTERM.

Fixes #1367.
2017-11-16 19:28:32 -08:00
Andrey Lushnikov
cc0c461ea8
fix(Launcher): handle SIGTERM by default (#1402)
SIGTERM signal is widely used to notify application that it will be shut down.

This patch starts listening to SIGTERM event to gracefully retire
chromium instance.

References #1047.
2017-11-16 14:26:32 -08:00
Sean Tan
d8ac8fcfb0 docs(api.md): fix return signatures that contains null (#1364) 2017-11-15 10:53:17 -08:00
Andrey Lushnikov
99103cbb97
chore: bump version to 1.0.0rc (#1389) 2017-11-14 15:58:11 -08:00
Andrey Lushnikov
0467c346b1 chore: mark version 0.13.0 2017-11-10 18:16:20 -08:00
Robin
9b907b9ada docs(api): javascript -> JavaScript (#1338) 2017-11-10 13:35:22 -08:00
JoelEinbinder
b7566c1a83 docs: document osx keyboard shortcuts not working (#1311)
Fixes #776
2017-11-07 16:22:58 -08:00
Andrey Lushnikov
cbe3dc58a2
Revert "feat(Page): teach Page.setContent to wait for resources to load (#1152)" (#1312)
This reverts commit 80ee469429.

Lifecycle events are not ready yet to support the setContent scenario.
The prerequisite for this is
https://chromium-review.googlesource.com/c/chromium/src/+/747805 that
might not land soon due to technical concerns.
2017-11-07 14:18:05 -08:00
JoelEinbinder
b58d319926 fix(Page.click): throw a meaningful message for invisible elements (#1309)
This patch starts throwing a meaningful error message when trying to click the hidden
node.

References #1294
2017-11-07 13:54:40 -08:00
Schelkun
77f585298f feat(Page): introduce Page bringToFront method (#1252)
This patch introduces Page.bringToFront method to activate tabs.

Fixes #1244
2017-11-07 13:17:36 -08:00
Adi Prasetyo
03fefb53f8 feat(browser): add browser.disconnected event (#960)
This patch adds a 'disconnected' event for the browser. The event is issued
when the "browser" loses connection to the chrome process.

References #952
2017-11-03 18:46:17 -07:00
Vse Mozhet Byt
7bc55ab7fd docs(api.md): fix return values of page.add*Tag() (#1269) 2017-11-03 09:32:17 -07:00
Xingan Wang
e0f5b93923 feat(Frame): addStyleTag and addScriptTag now return ElementHandles.
This patch teaches `page.addStyleTag` and `page.addScriptTag` to return ElementHandles
to the added tags.

Fixes #1179.
2017-11-03 00:05:38 -07:00
Vse Mozhet Byt
cee3081a41 docs(api.md): fix return value of frame.select() (#1251) 2017-11-02 21:46:49 -07:00
Suvrat Jain
fede2643ac feat(Frame): introduce Frame.select
This patch adds `Frame.select` method that does the same functionality as
former `Page.select`, but on a per-frame level.

The `Page.select` method becomes a shortcut for the ÷main frame's select.

Fixes #1139
2017-11-01 22:06:04 -07:00
Andrey Lushnikov
f5bb333cd0
fix: support PlzNavigate in puppeteer. (#1239)
This patch migrates puppeteer to support PlzNavigate chromium
project.

As a consequence of this patch, we no longer wait for both
requestWillBeSent and requestIntercepted events to happen. This should
resolve a ton of request interception bugs that "hanged" the loading.

Fixes #877.
2017-11-01 14:04:10 -07:00
Andrey Lushnikov
b9266c74f8
feat(Page): rename Page.getMetrics into Page.metrics (#1240)
BREAKING CHANGE: method page.getMetrics() got renamed into
page.metrics().
2017-11-01 13:39:31 -07:00
AlexChung1995
e70f98ddb9 feat(Page.select): return selected options from Page.select (#1099)
This patch teaches Page.select to return an array of actually selected options.
If no option is selected, an empty array will be returned.
2017-10-31 21:47:52 -07:00
burningTyger
6dec7cf6e4 typo in api.md (#1216)
more then -> more than
2017-10-31 11:30:29 -07:00
JoelEinbinder
e11dbd7be6 docs: add more keyboard examples for typing (#1176)
This adds more examples for using `keyboard.type` and `keyboard.press`. It adds warnings about Shift affecting or not affecting the text generated by certain methods.

fixes #723
2017-10-27 02:12:56 -07:00
Adam Stankiewicz
5ffbd0d221 feat(ElementHandle): add ElementHandle.$ and ElementHandle.$$ (#1151)
This patch adds `ElementHandle.$` and `ElementHandle.$$` methods to query nested
elements.

Fixes #508
2017-10-27 02:08:58 -07:00
Andrey Lushnikov
b9ab6fe4bb fix(interception): Disable newtork caching when intercepting (#1154)
Request interception might not work properly if caching is enabled.
2017-10-24 15:14:25 -07:00
Andrey Lushnikov
ce005d480c feat(Chromium): Roll chromium to r511134 (#1153)
This roll includes:
- crrev.com/510651 that changes request interception methods in protocol
- s/Page.setRequestInterceptionEnabled/Page.setRequestInterception

BREAKING CHANGE

Page.setRequestInterceptionEnabled is renamed into
Page.setRequestInterception.
2017-10-24 14:45:03 -07:00
Andrey Lushnikov
80ee469429 feat(Page): teach Page.setContent to wait for resources to load (#1152)
This patch adds "options" parameter to the `page.setContent` method. The
parameter is the same as a navigation parameter and allows to specify
maximum timeout to wait for resources to be loaded, as well as to
describe events that should be emitted before the setContent operation
would be considered successful.

Fixes #728.
2017-10-24 13:57:39 -07:00
Andrey Lushnikov
f38c8bb17b feat(Page.goto): support multiple events in waitUntil option (#1147)
This patch adds support to multiple events that could be passed inside
navigation methods:
- Page.goto
- Page.waitForNavigation
- Page.goForward
- Page.goBack
- Page.reload

Fixes #805
2017-10-24 10:05:15 -07:00
Andrey Lushnikov
ef369e5d5d feat(Page.goto): add a 'domcontentloaded' option to the Page.goto (#1145)
This patch adds a new `domcontentloaded` option to a bunch of navigation
methods:
- Page.goto
- Page.waitForNavigation
- Page.goBack
- Page.goForward
- Page.reload

Fixes #946.
2017-10-24 00:35:18 -07:00
Andrey Lushnikov
ce8a952044 refactor: migrate NavigatorWatcher to lifecycle events (#1141)
This patch:
- migrates navigation watcher to use protocol-issued lifecycle events.
- removes `networkIdleTimeout` and `networkIdleInflight` options for
  `page.goto` method
- adds a new `networkidle0` value to the waitUntil option of navigation
  methods

References #728.

BREAKING CHANGE:

As an implication of this new approach, the `networkIdleTimeout` and
`networkIdleInflight` options are no longer supported. Interested
clients should implement the behavior themselves using the `request` and
`response` events.
2017-10-23 18:10:59 -07:00
JoelEinbinder
126ab7b90e feat(keyboard): Accept codes (#1116)
BREAKING CHANGE:

This patch lets key names be code in addition to key. When specifying a code, the proper text is generated assuming a standard US keyboard layout. e.g Digit5 -> "5" or "%" depending on Shift.

* location is now specified. #777

* Using unknown key names now throws an error. #723

* Typing newlines now correctly presses enter. #681
2017-10-23 12:43:45 -07:00
r3dDoX
945a826a0b feat(install): add environment variable to overwrite host part of url (#958)
This patch adds PUPPETEER_DOWNLOAD_HOST env variable that allows to specify a download host. Useful for downloading from mirrors.

Fixes #951
2017-10-21 18:22:13 -07:00
Neeraj Singh
c9e1a2de4e docs(api): document that JSHandle.jsonValue might return error/blank (#1118) 2017-10-21 01:33:43 -07:00
Andrey Lushnikov
bcc969ccc4 feat(interception): Implement request.mockResponse method (#1064)
feat(interception): Implement request.respond method

This patch implements a new Request.respond method. This
allows users to fulfill the intercepted request with a hand-crafted
response if they wish so.

References #1020.
2017-10-20 16:55:15 -07:00
Andrey Lushnikov
5c92ba222a fix(page.evaluate): jsonValue should ignore toJSON property (#1098)
Currently, JSHandle.jsonValue() is implemented as in-page JSON.stringify
call and consequent JSON.parse in node. This approach proved to be
unfortunate for automation purposes: if page author overrode the
Object.prototype.toJSON method, then it's harder for puppeteer to
interact with the page.

This patch switches JSHandle.jsonValue to use protocol serialization
that ignores toJSON property. THis also changes the `page.evaluate`
behavior since it is based on JSHandle.jsonValue().

Fixes #1003.

BREAKING CHANGE:
`page.evaluate` no longer calls toJSON when generating return value.
For the old behavior, do JSON.parse/JSON.stringify manually:

```js
const json = JSON.parse(await page.evaluate(() => JSON.stringify(obj)));
```
2017-10-20 10:45:49 -07:00
Andrey Lushnikov
4f64dfd993 feat(Request): allow aborting intercepted requests with custom reasons (#1080)
This patch adds optional parameter to the `request.abort()` method
that specifies abort reason.

References #1020.
2017-10-18 00:26:48 -07:00
JoelEinbinder
32398d11bd feat(Browser): introduce Browser.pages() (#554)
This patch:
- introduces Target class that represents any inspectable target, such as service worker or page
- emits events when targets come and go
- introduces target.page() to instantiate a page from a target

Fixes #386, fixes #443.
2017-10-17 19:14:57 -07:00
Andrey Lushnikov
273c733237 feat(Request): introduce Request.failure() method (#1065)
Similarly to the `request.response()` method, this patch adds
`request.failure()` method that returns error details for the failed
requests.

Fixes #901.
2017-10-17 17:48:04 -07:00
JoelEinbinder
2b7951473d feat(Browser): make browser.close() to always terminate remote browser
This patch:
- changes `browser.close` to terminate browser.
- introduces new `browser.disconnect` to disconnect from a browser without closing it

This patch: fixes #918, fixes #989 

BREAKING CHANGE:
`browser.close()` will always close a browser, even if it was initialized with
`puppeteer.connect`. To disconnect from a remote browser, use `browser.disconnect()` instead.
2017-10-17 15:35:00 -07:00
Christopher Deutsch
aebbcf21e8 docs(api): queryObjects returns a Promise<JSHandle> (#1053) 2017-10-16 17:11:05 -07:00
Andrey Lushnikov
a73a67447e docs(api): fix comments in the diagram description 2017-10-16 13:26:04 -07:00
Andrey Lushnikov
e7eb7b3ccb docs(api): add hierarchical diagram (#1040) 2017-10-16 11:07:06 -07:00
Christian Davis
e3eec24894 docs(api): add missing 'hidden' option on frame.waitForSelector 2017-10-14 22:57:56 -07:00
Andrey Lushnikov
5686d53808 chore: bump version to 0.13.0-alpha 2017-10-14 10:02:07 -07:00
Andrey Lushnikov
b555151c14 chore: mark version 0.12.0 2017-10-14 09:41:06 -07:00
JoelEinbinder
6a8865cd85 feat(keyboard): make keyboard.down generate input event by default (#1016)
This patch starts generating input events for `keyboard.down`, addressing bullet 2 of
#723. With this patch, there's no longer any difference between `keboard.press('a')` and
`keyboard.press('a', {text: 'a'})`.

BREAKING CHANGE:
`keyboard.down('a')` starts generating input event (wasn't the case before).

References #723
2017-10-13 15:22:55 -07:00
Andrey Lushnikov
a02347e3ef feat(Page): implement page.setOfflineMode (#1032)
This patch implements page.setOfflineMode method.

Fixes #63.
2017-10-13 14:41:39 -07:00
Christian Davis
8511db957f feat(page): waitForSelector hidden option (#967)
This patch adds a 'hidden' option for the `page.waitForSelector` method.
2017-10-13 09:11:11 -07:00
Sam Verschueren
c310f139a0 feat(Frame): Support options in addScriptTag and addStyleTag (#996)
This patch:
- deprecates injectFile as it was confused with the addScriptTag
- accepts an options object in addScriptTag which supports properties url, path and content.
- accepts an options object in addStyleTag which supports properties url, path and content.

Fixes #949.

BREAKING CHANGE:
- the addStyleTag/addScriptTag have changed;
- the injectFile was removed in favor of (addStyleTag({path:}).
2017-10-12 01:26:44 -07:00
JoelEinbinder
0426e3c068 Roll chromium to 508268 (#1019)
This gets us:

- Plural metrics names https://crrev.com/507885
- TargetInfoChanged on URL changes https://crrev.com/508049
- Sending proper resource types for requests https://crrev.com/667504

Fixes #734
2017-10-12 01:17:06 -07:00
Andrey Lushnikov
23c0ba0727 feat(Page): introduce Page.queryObjects (#1005)
This patch introduces `Page.queryObjects` and
`ExecutionContext.queryObjects` methods to query JavaScript heap
for objects with a certain prototype.

Fixes #304.
2017-10-11 14:41:20 -07:00
Barry vd. Heuvel
3f9f0f44ff feat(Page.pdf): add 'A6' page format
This patch adds 'A6' page format option to the Page.pdf method.
2017-10-11 13:18:14 -07:00
Andrey Lushnikov
7a8aa73466 feat(Page): introduce Page.$$eval method (#1006)
This patch adds a `Page.$$eval` method that runs `document.querySelectorAll`
and passes resulting array to the page function.

Fixes #625.
2017-10-10 23:23:14 -07:00
Andrey Lushnikov
464b6a9616 fix(Page.getMetrics): do not report a few metrics (#1001)
A few of the reported metrics in the Page.getMetrics are already
reported with lifecycle events.

This patch excludes these metrics for now.
2017-10-10 15:22:14 -07:00
Alexei Filippov
b82d3197ed feat(Page): Support Page.getMetrics and metrics event. (#939)
Provides access to the current page performance metrics.
Allows to push page metrics from the page JavaScript with console.timeStamp()

Fixes #309
2017-10-10 14:50:38 -07:00
Roberto Toro
13f100bd26 docs(api): fix typo
'Than' was used in a few places instead of 'then'.
2017-10-10 11:07:39 -07:00
Andrey Lushnikov
1fbf2a8a46 feat(Page): kill the page.plainText method (#994)
The page.plainText is confusing: it's unclear what kind of text it
returns, textContent or innerText. It's also easily polyfillable and
doesn't seem to be used.

BREAKING CHANGE: the page.plainText is not existing any more.
Instead, use `page.evaluate(() => document.body.innerText)`.
2017-10-10 10:54:51 -07:00
Andrey Lushnikov
079db90066 fix(JSHandle.toString): clearer description for primitives (#993)
This patch:
- updates JSHandle.toString to make a nicer description for primitives
- excludes JSHandle.toString from documentation to avoid its abuse

References #382
2017-10-10 10:54:20 -07:00
Andrey Lushnikov
c3fb367148 fix(Request): convert resourceType to all small-caps (#990)
This patch moves resourceType to be all small-caps. This aligns
with our convention that all string constants should be smallcaps.

BREAKING CHANGE: this patch changes the constants of the
request.resourceType to be all small-caps.
2017-10-10 10:53:37 -07:00
Eli Sherer
7e28dbafb5 feat(ElementHandle): add EH.boundingBox and EH.screenshot
This patch:
- adds `ElementHandle.boundingBox()` method to get bounding box of element relative
  to the page
- adds `ElementHandle.screenshot()` method to capture a screenshot of an element
2017-10-09 23:14:09 -07:00
Eric Bidelman
7b5d7ddac2 docs(readme): fix typo (#988) 2017-10-09 22:24:21 -07:00
Vse Mozhet Byt
f1aa18af4e feat(Launcher): add devtools option (#953)
This patch adds a `devtools` option to the launcher that adds the `--auto-open-devtools-for-tabs`
argument to the launched chrome.

Fixes #864.
2017-10-09 17:25:25 -07:00
Andrey Lushnikov
e6af6e19d6 feat(console): dispatch JSHandles as console arguments (#975)
This patch starts dispatching JSHandle instances as console arguments.

BREAKING CHANGE: this changes the API of the ConsoleMessage.

Fixes #324.
2017-10-09 17:01:01 -07:00
JoelEinbinder
8d1d9fec65 chore(doc): replace 'could' with 'can' 2017-10-09 13:28:48 -07:00
JoelEinbinder
a7672acb85 fix: return undefined when Page.evaluate encounters circular JSON (#983) 2017-10-09 12:30:05 -07:00
Vse Mozhet Byt
44cdf85b77 chore(doc): fix a link (#977) 2017-10-07 08:32:40 -07:00
Vse Mozhet Byt
4e558674a8 chore(doc): fix nits after JSHandles PR (#976) 2017-10-07 08:31:55 -07:00
Andrey Lushnikov
3214bb73b0 chore(doc): fix implicit link to JSHandle 2017-10-07 00:34:54 -07:00
JoelEinbinder
0af0d7dba5 feat(Input): Add keyboard methods to elementHandle (#801)
This patch:
- adds input methods to ElementHandle, such as ElementHandle.type and ElementHandle.press
- changes `page.type` to accept selector as the first argument
- removes `page.press` method. The `page.press` is rarely used and doesn't operate with selectors; if there's a need to press a button, `page.keyboard.press` should be used.

BREAKING CHANGE: `page.type` is changed, `page.press` is removed.

Fixes #241.
2017-10-07 00:28:24 -07:00
Andrey Lushnikov
0d0f9b7984 feat(JSHandles): introduce JSHandles (#943)
This patch:
- introduces ExecutionContext class that incapsulates javascript
  execution context. An examples of execution contexts are workers and
  frames
- introduces JSHandle that holds a references to the javascript
  object in ExecutionContext
- inherits ElementHandle from JSHandle

Fixes #382.
2017-10-06 15:35:02 -07:00
Andrey Lushnikov
59bcc2ee56 chore(docs): fix console example in docs/api.md 2017-10-05 17:34:13 -07:00
Benoît Zugmeyer
c225b93037 feat(Launcher): Allow environment variables definition when launching chromium (#912)
This patch adds `env` option to the `puppeteer.launch` method to define custom environment
variables to the launched chrome.
2017-10-05 14:34:35 -07:00
Sam Verschueren
97e40e6823 feat(Frame): Add addStyleTag API to frame - fixes #892 (#947)
This patch adds `Page.addStyleTag` and `Frame.addStyleTag` methods to the API.

Fixes #892.
2017-10-04 13:42:26 -07:00
Vse Mozhet Byt
f9640a5498 chore(doc): add a note about using ElementHandle instances (#925) 2017-10-01 15:47:40 -07:00
Adi Prasetyo
53531c9a92 feat(page): Allow Page.goto's timeout to be 0 to disable timeout (#887)
This patch allows passing 0 to disable timeout for the following methods:

- page.goto
- page.waitForNavigation
- page.goForward
- page.goBack

Fixes #782.
2017-09-30 00:29:38 -07:00
Vse Mozhet Byt
1c292e9253 chore(doc): fix browser.wsEndpoint() return value format (#898) 2017-09-29 14:59:19 -07:00
Andrey Lushnikov
f6255029bd feat(Console): Introduce ConsoleMessage type (#909)
This patch introduces ConsoleMessage type and starts dispatching
it for the 'console' event.

BREAKING CHANGE: this breaks the api of the 'console' event.

Fixes #744.
2017-09-29 11:27:22 -07:00
Jake Ginnivan
0164b7cc4e Added info on how to find the browserWSEndpoint (#780) 2017-09-26 07:04:09 -07:00
Andrey Lushnikov
9b0a06216e [docs] clarify env variables usage with npmrc 2017-09-26 11:15:18 +09:00