Bug 1533679 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The minimal CDP server to be landed in bug 1523104, will support very basic features in order to enable basic usages of chrome-remote-interface client library.
This is demonstrated by the following test: remote/test/browser/browser_cdp.js

But we are lacking support of /json/version and a couple of methods on Target domain (Target.getBrowserContexts and Target.setDiscoverTargets) in order to allow `puppeteer.connnect()` function to work.

We do not have any infra to run puppeteer script/test from mozilla-central,
so the only way to evaluate this support is to manually run a puppeteer nodejs script, like this:

* First, run a server:
```
$ ./mach run --remote-debugging-port=9000 --headless
```

* Run nodejs script:
```
$ DEBUG="puppeteer:protocol" node script.js 
```
```
const puppeteer = require('./index');

puppeteer.connect({ browserURL: "http://localhost:9000"}).then(browser => {
  console.log("SUCCESS");
});
```

(Note that you will need `ac_add_options --enable-cdp` to be set in your mozconfig
 and also note that this works with artifact builds)
The minimal CDP server to be landed in bug 1523104, will support very basic features in order to enable basic usages of chrome-remote-interface client library.
This is demonstrated by the following test: remote/test/browser/browser_cdp.js

But we are lacking support of /json/version and a couple of methods on Target domain (Target.getBrowserContexts and Target.setDiscoverTargets) in order to allow `puppeteer.connnect()` function to work.

We do not have any infra to run puppeteer script/test from mozilla-central,
so the only way to evaluate this support is to manually run a puppeteer nodejs script, like this:

* First, run a server:
```
$ ./mach run --remote-debugging-port=9000 --headless
```

* Run nodejs script:
```
$ DEBUG="puppeteer:protocol" node script.js 
```
```
const puppeteer = require('puppeteer');

puppeteer.connect({ browserURL: "http://localhost:9000"}).then(browser => {
  console.log("SUCCESS");
});
```

(Note that you will need `ac_add_options --enable-cdp` to be set in your mozconfig
 and also note that this works with artifact builds)

Back to Bug 1533679 Comment 0