Package io.karatelabs.driver.cdp
Class CdpLauncher
java.lang.Object
io.karatelabs.driver.cdp.CdpLauncher
CDP-based browser launcher.
Manages Chrome browser process lifecycle.
Launches Chrome with CDP debugging enabled and provides WebSocket URL for connection.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the browser process.static voidcloseAll()Close all active browser instances.voidClose the browser process and wait for it to terminate.getHost()intgetPort()static StringgetWebSocketUrl(String host, int port) Get WebSocket URL from existing browser at host:port.booleanisClosed()Check if this launcher has been closed.booleanstatic CdpLauncherstart(CdpDriverOptions options) Launch Chrome browser and return launcher instance.
-
Field Details
-
DEFAULT_PATH_MAC
- See Also:
-
DEFAULT_PATH_WIN64
- See Also:
-
DEFAULT_PATH_WIN32
- See Also:
-
DEFAULT_PATH_LINUX
- See Also:
-
-
Method Details
-
closeAll
public static void closeAll()Close all active browser instances. -
start
Launch Chrome browser and return launcher instance. -
getWebSocketUrl
Get WebSocket URL from existing browser at host:port. -
getWebSocketUrl
-
getPort
public int getPort() -
getHost
-
isRunning
public boolean isRunning() -
close
public void close()Close the browser process. Thread-safe: only the first caller will actually close the process. -
closeAndWait
public void closeAndWait()Close the browser process and wait for it to terminate. Thread-safe: only the first caller will actually close the process. -
isClosed
public boolean isClosed()Check if this launcher has been closed.
-