Commit Graph

16 Commits

Author SHA1 Message Date
Jefferson Pereira
7b8f80ade8
docs: anchor selector on search example (#9854)
Co-authored-by: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com>
2023-03-15 14:10:07 +01:00
jrandolf
84712cbc28
chore: use Google's TS style guide's format config (#8542) 2022-06-22 15:25:44 +02:00
Jan Scheffler
044865eff7
chore: update example (#7616) 2021-09-30 09:33:24 +00:00
Talendran
8d1a697fc3
docs(examples): change searching for searchbox to .devsite class (#6301) 2021-09-11 11:02:40 +00:00
Thomas Chaplin
9275653130
docs(examples): update selector for search example (#6471)
This commit updates the selector used in some examples as it no longer matched the target page’s DOM.

Fixes #6470, fixes #5071.
2020-10-05 06:48:34 +02:00
Jack Franklin
4fdb1e3cab
chore: add Prettier (#5825) 2020-05-07 12:54:55 +02:00
Andrey Lushnikov
d68033aeca
chore(examples): indent all examples (#1783)
Indented examples are easier to read.
2018-01-11 13:42:01 -08:00
Eric Bidelman
cb1cb695a5 chore(search) - search developers.google.com for "Headess chrome" articles (#1586)
Adds back a search demo. I chose developers.google.com b/c the protocol viewer uses shadow dom. Gets a bit confusing.

Fixes #1578
2017-12-14 19:13:27 -08:00
Andrey Lushnikov
ea5da00755
chore: remove search.js example (#1564)
The example is violating the TOS of google.com

Fix #1557
2017-12-08 19:04:09 -08:00
Andrew Apicello
f9b017efaa chore(examples): update search example (#1181)
The search bar was not fully loaded and therefore "puppeteer" could not be entered into the submit field.

This patch starts waiting for the input element to be rendered to ensure this
element is loaded before attempting to populate it.
2017-10-27 02:10:35 -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
Sashiyama Yoshiki
fbee98aa51 chore(examples): add missing argument to search example (#1066)
Fixes #1059.
2017-10-17 15:07:16 -07:00
cohesively
aa58f25bc1 doc: add await to browser.close in usage examples (#797)
browser.close returns a promise after f398e69, so it should be awaited.
2017-09-15 21:27:14 -07:00
Vse Mozhet Byt
60ace82875 add 'use strict'; to examples (#530)
This patch:
- adds 'use strict'; to examples
- enforces 'use strict' in examples with .eslintrc.js
2017-08-24 17:33:41 -07:00
Andrey Lushnikov
13e8580a34 Use puppeteer.launch instead of browser constructor (#255)
This patch:
- split browser launching logic from Browser into `lib/Launcher.js`
- introduce `puppeteer` namespace which currently has a single `launch`
  method to start a browser

With this patch, the browser is no longer created with the `new
Browser(..)` command. Instead, it should be "launched" via the
`puppeteer.launch` method:

```js
const puppeteer = require('puppeteer');
puppeteer.launch().then(async browser => {
  ...
});
```

With this approach browser instance lifetime matches the lifetime of
actual browser process. This helps us:
- remove proxy streams, e.g. browser.stderr and browser.stdout
- cleanup browser class and make it possible to connect to remote
  browser
- introduce events on the browser instance, e.g. 'page' event. In case
  of lazy-launching browser, we should've launch browser when an event
  listener is added, which is unneded comlpexity.
2017-08-14 18:08:06 -07:00
JoelEinbinder
53baed6af6 Google search example (#220)
Add google search example.

References #178
2017-08-11 01:41:42 -07:00