0
# DevTools Domains
1
2
The v129Domains class serves as the central factory for accessing all Chrome DevTools Protocol v129 domain implementations. It manages the lifecycle and dependencies of all domain-specific APIs.
3
4
## Capabilities
5
6
### Domains Factory
7
8
Creates and manages instances of all v129 DevTools protocol domains.
9
10
```java { .api }
11
/**
12
* Central factory providing access to all v129 DevTools protocol domains
13
* @param devtools - DevTools instance for protocol communication
14
*/
15
public class v129Domains implements Domains {
16
public v129Domains(DevTools devtools);
17
18
/** Returns the Events domain for console and exception handling */
19
public Events<?, ?> events();
20
21
/** Returns the Javascript domain for script execution and binding */
22
public Javascript<?, ?> javascript();
23
24
/** Returns the Network domain for request/response interception */
25
public Network<?, ?> network();
26
27
/** Returns the Target domain for tab and context management */
28
public Target target();
29
30
/** Returns the Log domain for browser log access */
31
public Log log();
32
}
33
```
34
35
**Usage Examples:**
36
37
```java
38
import org.openqa.selenium.devtools.DevTools;
39
import org.openqa.selenium.devtools.v129.v129Domains;
40
41
// Create domains factory
42
DevTools devTools = driver.getDevTools();
43
devTools.createSession();
44
v129Domains domains = new v129Domains(devTools);
45
46
// Access specific domains
47
var networkDomain = domains.network();
48
var logDomain = domains.log();
49
var eventsDomain = domains.events();
50
51
// Use domain capabilities
52
devTools.send(logDomain.enable());
53
devTools.send(networkDomain.enableNetworkCaching());
54
```
55
56
### Service Provider Information
57
58
Provides version and factory information for automatic service discovery.
59
60
```java { .api }
61
/**
62
* Service provider implementation for CDP version 129
63
* Automatically registered via @AutoService annotation
64
*/
65
@AutoService(CdpInfo.class)
66
public class v129CdpInfo extends CdpInfo {
67
/** Initializes with version 129 and v129Domains factory */
68
public v129CdpInfo();
69
}
70
```
71
72
**Usage Examples:**
73
74
```java
75
// Service is automatically discovered and registered
76
// No direct instantiation required - used internally by Selenium
77
78
// To verify version support:
79
import org.openqa.selenium.devtools.CdpInfo;
80
import java.util.ServiceLoader;
81
82
ServiceLoader<CdpInfo> loader = ServiceLoader.load(CdpInfo.class);
83
for (CdpInfo info : loader) {
84
if (info instanceof v129CdpInfo) {
85
// v129 support is available
86
break;
87
}
88
}
89
```
90
91
## Types
92
93
### Base Interfaces
94
95
```java { .api }
96
// From idealized DevTools interfaces
97
interface Domains {
98
Events<?, ?> events();
99
Javascript<?, ?> javascript();
100
Network<?, ?> network();
101
Target target();
102
Log log();
103
}
104
105
// Service provider base
106
abstract class CdpInfo {
107
protected CdpInfo(int majorVersion, Supplier<Domains> domainsSupplier);
108
}
109
```
110
111
### Dependencies
112
113
```java { .api }
114
// Required imports for domains usage
115
import org.openqa.selenium.devtools.DevTools;
116
import org.openqa.selenium.devtools.idealized.Domains;
117
import org.openqa.selenium.devtools.idealized.Events;
118
import org.openqa.selenium.devtools.idealized.Javascript;
119
import org.openqa.selenium.devtools.idealized.Network;
120
import org.openqa.selenium.devtools.idealized.log.Log;
121
import org.openqa.selenium.devtools.idealized.target.Target;
122
```