A Go library for driving browsers via the Chrome DevTools Protocol without external dependencies.
chromedp is a Go package that provides a fast and simple way to automate browsers supporting the Chrome DevTools Protocol. It enables developers to control Chrome or Chromium browsers programmatically for tasks like web scraping, testing, and automation without requiring external dependencies.
Go developers who need to automate Chrome or Chromium browsers for tasks such as web scraping, automated testing, or generating screenshots. It is particularly suited for those building server-side automation tools or working in containerized environments.
Developers choose chromedp for its pure Go implementation that eliminates the need for external drivers like Selenium, offering a simpler and more performant native approach. It provides full access to the Chrome DevTools Protocol with context-based control and seamless Docker integration.
A faster, simpler way to drive browsers supporting the Chrome DevTools Protocol.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Eliminates external dependencies like Selenium, simplifying deployment and reducing overhead in Go-based projects, as highlighted in the README's emphasis on no external drivers.
Generated Go bindings provide complete control over the Chrome DevTools Protocol, enabling advanced tasks such as JavaScript execution and network interception, based on the 'Full Protocol Support' feature.
Default headless mode and seamless integration with the official headless-shell Docker image make it ideal for server-side and containerized automation, as noted in the Docker Integration feature and FAQ.
Uses Go contexts for lifecycle management, allowing efficient error handling and resource cleanup in concurrent applications, evident from the context-based control philosophy and FAQ on context errors.
Only supports Chrome/Chromium browsers, making it unsuitable for cross-browser testing or automation scenarios where other browsers are required, a clear restriction from its dependency on the Chrome DevTools Protocol.
FAQ mentions 'context canceled' errors and force-killing on Linux, which can lead to unstable sessions and require careful error handling, indicating potential resource management issues.
For actions returning multiple values, developers must wrap them in ActionFunc, adding extra code and complexity compared to more abstracted frameworks, as explained in the FAQ section.
chromedp is an open-source alternative to the following products:
Selenium is an open-source framework for automating web browsers, enabling testing of web applications across different browsers and platforms through scripting in various programming languages.
Puppeteer is a Node.js library that provides a high-level API to control Chrome or Chromium browsers for automation, testing, and web scraping.