Products

cdp4j - Browser automation library for Java platform

Integrate a Chromium-based browser with your Java application to process HTML, CSS and JavaScript.

These are Some of the Problems We Help Developers Solve

Printing

You can save the loaded web page as PDF document.

example
Cookies

You can access all the cookies including secure and HTTP-only ones, delete specific cookie or create a new one.

example
Navigation events

You can listen to different navigation events such as navigation started, finished, failed, redirected, frame load finished, etc.

example
User-agent

With cdp4j you can set your own user-agent for each Browser session.

example
Filtering URLs

The library allows you to handle navigation requests and ignore them when it's necessary.

example
Console Listener

You can listen to console message events including JavaScript errors.

example
DOM Access

DOM API provides functionality that can be used for accessing and modifying DOM, finding particular nodes, modifying their attributes and contents.

example
JavaScript to Java Bridge

You can execute JavaScript code on the loaded web page and return the result of execution to the Java side.

example
CSS, XPath and Text Selector

Evaluate XPath, CSS and text selector expressions in scope of the whole document.

example
File Downloads

You can handle file downloads and control whether a file should be downloaded or not.

example
JavaScript Dialogs

You can handle JavaScript dialogs such as alert, confirmation, prompt, beforeunload, and file upload. You can choose whether a JavaScript dialog should be displayed or not and what the dialog should look like.

example
Screenshot

cdp4j allows you to take a screenshot of any web page including hidden scrollable area and save it as an image file.

example