-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connecting Puppeteer to a Chrome-Launcher instance. #2790
Comments
This should work. Make sure chrome launcher launches Chrome 69; otherwise, things won't work. |
I am still not getting , how to connect puppeteer with chome instace ? give me live example with that open third-party website using browser instace (if possible !) |
There's an example on
https://github.com/GoogleChromeLabs/puppeteer-examples/blob/master/lighthouse/chromelauncher_puppeteer.js
.
I'd use page.goto() to navigate to the URL. IOW use chrome launcher to only
launch a new instance of chrome, use puppeteer for everything else.
…On Wed, Dec 12, 2018, 4:08 AM MeetPatel5 ***@***.*** wrote:
I am still not getting , how to connect puppeteer with chome instace ?
give me live example with that open third-party website using browser
instace (if possible !)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2790 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOigDKuJihVBv_FFq0rYfGEn17TlTSkks5u4PGogaJpZM4Uy0ME>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
1.
const chromeLauncher = require('chrome-launcher');
const puppeteer = require('puppeteer');
const request = require('request');
const util = require('util');
(async() => {
const chrome = await chromeLauncher.launch({
startingUrl: 'http://www.google.com'
});
const resp = await util.promisify(request)(
http://localhost:${chrome.port}/json/version
);const {webSocketDebuggerUrl} = JSON.parse(resp.body);
const browser = await puppeteer.connect({
browserWSEndpoint: webSocketDebuggerUrl
});
const page = browser.newPage();
})();
What is the expected result?
Puppeteer connects with the chrome launcher instance and creates a new page.
What happens instead?
Stays on starting url (google.com) unsure if it is actually connected to it or not.
The text was updated successfully, but these errors were encountered: