{"id":31970533,"url":"https://github.com/hubspot/chromedevtoolsclient","last_synced_at":"2025-10-14T19:16:09.759Z","repository":{"id":33816732,"uuid":"136938960","full_name":"HubSpot/ChromeDevToolsClient","owner":"HubSpot","description":"A java websocket client for the Chrome DevTools Protocol","archived":false,"fork":false,"pushed_at":"2025-08-01T19:49:37.000Z","size":1447,"stargazers_count":41,"open_issues_count":3,"forks_count":16,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-08-01T20:52:04.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HubSpot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-11T14:36:54.000Z","updated_at":"2025-07-24T14:39:24.000Z","dependencies_parsed_at":"2024-02-13T18:10:54.254Z","dependency_job_id":"62e7592c-0408-401e-90bd-5140c1a4bb0c","html_url":"https://github.com/HubSpot/ChromeDevToolsClient","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/HubSpot/ChromeDevToolsClient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FChromeDevToolsClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FChromeDevToolsClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FChromeDevToolsClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FChromeDevToolsClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HubSpot","download_url":"https://codeload.github.com/HubSpot/ChromeDevToolsClient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpot%2FChromeDevToolsClient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020649,"owners_count":26086895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-14T19:16:00.837Z","updated_at":"2025-10-14T19:16:09.753Z","avatar_url":"https://github.com/HubSpot.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChromeDevToolsClient\n\nA java websocket client for the [Chrome DevTools Protocol](https://chromedevtools.github.io/debugger-protocol-viewer/tot/). Latest release built against protocol version `1.3` (will generally track the latest stable version of the protocol)\n\n## Including Via Maven\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.hubspot.chrome\u003c/groupId\u003e\n  \u003cartifactId\u003eChromeDevToolsClient\u003c/artifactId\u003e\n  \u003cversion\u003e1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nRun Chrome with remote debugging enabled in headless mode\n```bash\ngoogle-chrome --headless --disable-gpu --remote-debugging-port=9292\n```\n\nConnect to Chrome using the `ChromeDevToolsClient` class. The `ChromeDevToolsClient` can create multiple connections to separate instances of Chrome. Each connection results in a separate `ChromeDevToolsSession`.\n\n```java\n// Create a client\nChromeDevToolsClient client = ChromeDevToolsClient.defaultClient();\n\n// Connect to Chrome Dev Tools Running on port 9292 on your local machine\ntry (ChromeDevToolsSession session = client.connect(\"127.0.0.1\", 9292)) {\n  // Control Chrome remotely\n  session.navigate(\"https://www.hubspot.com/\");\n}\n\n// Close the client when your finished\nclient.close();\n```\n\nThe `ChromeDevToolsSession` class provides all methods for interacting with Chrome. There are synchronous and asynchronous versions available for each method.\n\nYou can also check out our [examples](TODO) for more.\n\n## Configuring ChromeDevToolsClient\n\nYou can construct your dev tools client with the following options:\n\n```java\nChromeDevToolsClient client = new ChromeDevToolsClient.Builder()\n\n    /*\n     * An instance of com.hubspot.horizon.HttpClient. The HttpClient is used to hit the devtools /json/list endpoint to grab the first available target id to control\n     * Default: the default com.hubspot.horizon.ning.NingHttpClient\n     */\n    .setHttpClient()\n\n    /*\n     * The timeout for getting a valid response from the /json/list endpoint via http. If no valid response is received in this time a ChromeDevToolsException is thrown\n     * Default: 5 seconds\n     */\n    .setSessionConnectTimeoutMillis()\n\n    /*\n     * A global timeout for any action performed in the client. If the client does not receive a response for an action taken in this amount of time\n     * a ChromeDevToolsException is thrown\n     * Default: 60 seconds\n     */\n    .setActionTimeoutMillis()\n\n    /*\n     * An instnace of java.util.concurrent.ExecutorService which provides the thread pool for event listeners and any async actions performed in the client\n     * Default: A ThreadPoolExecutor with a max pool size of 10 threads\n     */\n    .setExecutorService()\n\n    /*\n     * An instance of com.fasterxml.jackson.databind.ObjectMapper responsible for (de)serializing the json sent to and received from Chrome.\n     * The default ObjectMapper for the client is configured with a custom deserializer for Chrome events. You will generally not need to update this\n     */\n    .setObjectMapper()\n    .build();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspot%2Fchromedevtoolsclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubspot%2Fchromedevtoolsclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspot%2Fchromedevtoolsclient/lists"}