Java bindings for Chrome DevTools Protocol version 102, providing programmatic access to Chrome browser debugging and automation capabilities
—
Core functionality for managing CDP domains and creating the main entry point for all DevTools operations. This module provides the foundational classes needed to establish connections and access specific CDP domain functionality.
Main entry point providing access to all CDP domain implementations. This class serves as a factory and container for all domain-specific wrappers, enabling coordinated access to Chrome DevTools Protocol functionality.
/**
* Main entry point providing access to all CDP domain implementations
*/
public class V102Domains implements Domains {
/**
* Creates a new V102Domains instance with the specified DevTools connection
* @param devtools DevTools connection instance (required, non-null)
*/
public V102Domains(DevTools devtools);
/**
* Returns the Events domain for handling runtime events and console operations
* @return V102Events instance for event handling
*/
public Events<?, ?> events();
/**
* Returns the Javascript domain for script execution and binding operations
* @return V102Javascript instance for JavaScript operations
*/
public Javascript<?, ?> javascript();
/**
* Returns the Network domain for network operations and request interception
* @return V102Network instance for network operations
*/
public Network<?, ?> network();
/**
* Returns the Target domain for browser target management
* @return V102Target instance for target operations
*/
public Target target();
/**
* Returns the Log domain for console log management
* @return V102Log instance for log operations
*/
public Log log();
/**
* Disables all domains (events, javascript, and network)
* Note: Deliberately does not disable targets or log domains
*/
public void disableAll();
}Usage Examples:
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v102.V102Domains;
// Basic setup
ChromeDriver driver = new ChromeDriver();
DevTools devTools = driver.getDevTools();
devTools.createSession();
// Create domains instance
V102Domains domains = new V102Domains(devTools);
// Access specific domains
domains.network().enableNetworkCaching();
domains.events().enable();
domains.javascript().enable();
// Perform operations...
// Cleanup all domains at once
domains.disableAll();CDP version information provider for v102. This class implements the service provider interface for Chrome DevTools Protocol version 102, enabling automatic discovery and registration within the Selenium DevTools framework.
/**
* CDP version information provider for v102
* Annotated with @AutoService for automatic service discovery
*/
@AutoService(CdpInfo.class)
public class V102CdpInfo extends CdpInfo {
/**
* Creates CDP info for version 102 with V102Domains factory
* Automatically registers version 102 with V102Domains constructor
*/
public V102CdpInfo();
}Usage Examples:
// V102CdpInfo is typically used automatically by the framework
// It registers version 102 support and provides the V102Domains factory
// Direct usage (rare, usually handled by framework):
V102CdpInfo cdpInfo = new V102CdpInfo();
// Version 102 is now registered and available for DevTools sessionsThe idealized interface that V102Domains implements, providing version-agnostic access to CDP functionality.
/**
* The idealized set of CDP domains that Selenium itself needs
*/
public interface Domains {
Events<?, ?> events();
Javascript<?, ?> javascript();
Network<?, ?> network();
Target target();
Log log();
/**
* Disables events, javascript, and network domains
* Deliberately does not disable targets or log
*/
default void disableAll();
}// Core DevTools classes
class DevTools { ... }
// Idealized interfaces
interface Events<ConsoleEvent, ExceptionEvent> { ... }
interface Javascript<ScriptId, BindingEvent> { ... }
interface Network<AuthEvent, RequestEvent> { ... }
interface Target { ... }
interface Log { ... }
// Base CDP info class
abstract class CdpInfo { ... }// Google Auto Service annotation for automatic registration
@AutoService(CdpInfo.class)The domain management system uses Google's AutoService for automatic service discovery, allowing the Selenium framework to automatically detect and register v102 CDP support without manual configuration.
Install with Tessl CLI
npx tessl i tessl/maven-org-seleniumhq-selenium--selenium-devtools-v102