{"id":18990585,"url":"https://github.com/baristalabs/chrome-dev-tools-runtime","last_synced_at":"2025-04-22T11:15:48.119Z","repository":{"id":19980730,"uuid":"87566344","full_name":"BaristaLabs/chrome-dev-tools-runtime","owner":"BaristaLabs","description":"Generated chrome developer protocol runtime from BaristaLabs/chrome-dev-tools-generator","archived":false,"fork":false,"pushed_at":"2022-06-10T00:58:04.000Z","size":896,"stargazers_count":44,"open_issues_count":8,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-17T00:15:42.462Z","etag":null,"topics":["chrome-developer-protocol"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaristaLabs.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}},"created_at":"2017-04-07T16:34:53.000Z","updated_at":"2025-02-10T23:03:40.000Z","dependencies_parsed_at":"2022-08-18T05:15:19.804Z","dependency_job_id":null,"html_url":"https://github.com/BaristaLabs/chrome-dev-tools-runtime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaristaLabs%2Fchrome-dev-tools-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaristaLabs%2Fchrome-dev-tools-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaristaLabs%2Fchrome-dev-tools-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaristaLabs%2Fchrome-dev-tools-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaristaLabs","download_url":"https://codeload.github.com/BaristaLabs/chrome-dev-tools-runtime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250228692,"owners_count":21395958,"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","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":["chrome-developer-protocol"],"created_at":"2024-11-08T17:10:28.140Z","updated_at":"2025-04-22T11:15:48.064Z","avatar_url":"https://github.com/BaristaLabs.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chrome-dev-tools-runtime\nRuntime for the [Chrome Developer Protocol](https://developer.chrome.com/devtools/docs/debugger-protocol). Generated by [BaristaLabs\\chrome-dev-tools-generator](https://github.com/BaristaLabs/chrome-dev-tools-generator)\n\nSimilar to [Puppeteer](https://github.com/GoogleChrome/puppeteer) but more low-level and for .Net Core.\n\u003e Updated for Chrome 70!!\n\n\n### Instructions\n\nYou can obtain the runtime from NuGet at the following location: \n\nhttps://www.nuget.org/packages/BaristaLabs.ChromeDevTools.Runtime/\n\nTo execute the sample cli:\n\n - Clone\n - Launch Chrome with debugging enabled at port 9223\n - Run\n\nWindows: \n``` bash\n$ git clone https://github.com/BaristaLabs/chrome-dev-tools-runtime\n$ cd chrome-dev-tools-runtime\\ChromeDevToolsRuntimeCLI\n$ \"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --remote-debugging-port=9223\n$ dotnet restore\n$ dotnet run\n```\n\nmacOS:\n\nOn macOS the behavior is a little different when launching the chrome process.\n\nFirst, open a new terminal window and execute\n``` bash\n$ /Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --remote-debugging-port=9223 --user-data-dir=remote-profile\n```\n\nThen clone and run the sample CLI in another terminal window:\n``` bash\n$ git clone https://github.com/BaristaLabs/chrome-dev-tools-runtime\n$ cd chrome-dev-tools-Runtime/ChromeDevToolsRuntimeCLI/\n$ dotnet restore\n$ dotnet run\n```\n\n### Commands\n\nIn general, using an instance of a ChromeSession, submit strongly-typed commands via the adapter methods.\n\n``` CS\nusing (var session = new ChromeSession(\"ws://...\")\n{\n    await session.Page.Navigate(new Page.NavigateCommand\n    {\n        Url = \"http://www.winamp.com\"\n    });\n}\n```\n\nAll commands can specify a timeout and are cancellable:\n``` CS\nusing (var session = new ChromeSession(\"ws://...\")\n{\n    var shouldCancel = new CancellationTokenSource();\n    await session.Page.Navigate(new Page.NavigateCommand\n    {\n        Url = \"http://www.winamp.com\"\n    }, millisecondsTimeout: 60000, cancellationToken: shouldCancel);\n    \n    shouldCancel.Cancel();\n}\n```\n### Events\n\nSubscribe to events via the Subscribe method\n\n``` CS\nusing (var session = new ChromeSession(\"ws://...\")\n{\n    session.Page.SubscribeToFrameNavigatedEvent((e) =\u003e\n    {\n        Console.WriteLine($\"Navigated to {e.Frame.Url}\");\n    });\n}\n```\n\nnote that you may need to send the associated enable command for a particular domain.\nAs events are asynchronous, you may need to ensure you program is still running when the event occurs or you may miss it.\n\n### Sample Projects\n\n - [Skinny Html2Pdf](https://github.com/baristalabs/skinny-html2pdf) - Convert Pages to PDF within a container.\n - [Skrapr](https://github.com/BaristaLabs/skrapr) - Declarative Web Scraping.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaristalabs%2Fchrome-dev-tools-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaristalabs%2Fchrome-dev-tools-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaristalabs%2Fchrome-dev-tools-runtime/lists"}