Skip to content
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

Is it possible to use with Chrome as background process? #61

Closed
LeMoussel opened this issue May 20, 2017 · 1 comment
Closed

Is it possible to use with Chrome as background process? #61

LeMoussel opened this issue May 20, 2017 · 1 comment

Comments

@LeMoussel
Copy link

LeMoussel commented May 20, 2017

Is it possible to use chromedp with Chrome headless as background process ?
eg.

// https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
// --disable-gpu currently required, see link above
google-chrome --headless --hide-scrollbars --remote-debugging-port=9222 --disable-gpu &

If yes, can you explain how can I do that?

@kenshaw
Copy link
Member

kenshaw commented May 20, 2017

Yes, you need to manually run chrome, and then you can connect to an existing chrome instance by manually creating the client and passing the targets with the WithTargets option. Please see the examples/headless/main.go file for an example of how the API is used.

@kenshaw kenshaw closed this as completed May 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants