Chrome DPClient
Deprecated
The entrypoint API has be reworked to favor the web socket connection approach. Use ChromeDP.connect() instead to connect to the debugger. Please check the docs and the KDoc of ChromeDP for more info. Moreover, the ChromeDPClient concrete type shouldn't be referenced as-is anymore, and will be hidden or removed in a future version. If you still need to access similar HTTP API methods, please use the ChromeDPHttpApi interface instead.
Replace with
import org.hildan.chrome.devtools.protocol.ChromeDPHttpApi
ChromeDPHttpApiA client using the Chrome Devtools Protocol to communicate with a running Chrome browser via the debugger API.
It provides access to the HTTP endpoints exposed by the Chrome browser, as well as web socket connections to the browser and its targets to make use of the full Chrome Devtools Protocol API.
Note: if you already know the browser target's web socket URL, you don't need to create a ChromeDPClient. Instead, you can directly use HttpClient.chromeWebSocket.
Host override
Chrome doesn't accept a Host header that is not an IP nor localhost, but in some environments the URL has to have a named host (e.g. docker services in a docker swarm, communicating using service names).
Enabling overrideHostHeader works around this problem by setting the Host header to "localhost" in the HTTP requests to the Chrome debugger. It also restores the original host in URLs that are returned by Chrome (Chrome uses the Host header to build the URLs that it returns, so they would contain localhost otherwise).
Functions
Brings the page identified by the given targetId into the foreground (activates a tab).
Closes all targets.
Opens a new tab, and returns the websocket target data for the new tab.
Fetches the current Chrome DevTools Protocol definition, as a JSON string.
Fetches the list of all available web socket targets (e.g. browser tabs).
Fetches the browser version metadata via the debugger's HTTP API.
Opens a web socket connection to interact with the browser.