CDP 0.2.5

.NET bindings for the Chrome DevTools Protocol

Install-Package CDP -Version 0.2.5
dotnet add package CDP --version 0.2.5
<PackageReference Include="CDP" Version="0.2.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CDP --version 0.2.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CDP, 0.2.5"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install CDP as a Cake Addin
#addin nuget:?package=CDP&version=0.2.5

// Install CDP as a Cake Tool
#tool nuget:?package=CDP&version=0.2.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Usage

using System;
using System.IO;
using CDP;
using CDP.Protocols;

class MainClass {
    public static void Main(string[] args) {
        HeadlessChrome chrome = new HeadlessChrome(
            HeadlessChrome.DefaultAppPathMac
        );
        // "using" clause ensures that close the chrome process
        using (chrome) {
            chrome.Page.FrameNavigated += (sender, e) => {
                Console.WriteLine("FrameNavigated: " + e.Frame.Id);
            };
            chrome.Start();
            chrome.Page.Enable();
            chrome.Page.Navigate("http://google.com");
            var png = chrome.Page.CaptureScreenshot();
            File.WriteAllBytes("Screenshot.png", png.Data);
            chrome.Delay(1000);
        }
    }
}

Please see the Wiki for more detailed usage

Usage

using System;
using System.IO;
using CDP;
using CDP.Protocols;

class MainClass {
    public static void Main(string[] args) {
        HeadlessChrome chrome = new HeadlessChrome(
            HeadlessChrome.DefaultAppPathMac
        );
        // "using" clause ensures that close the chrome process
        using (chrome) {
            chrome.Page.FrameNavigated += (sender, e) => {
                Console.WriteLine("FrameNavigated: " + e.Frame.Id);
            };
            chrome.Start();
            chrome.Page.Enable();
            chrome.Page.Navigate("http://google.com");
            var png = chrome.Page.CaptureScreenshot();
            File.WriteAllBytes("Screenshot.png", png.Data);
            chrome.Delay(1000);
        }
    }
}

Please see the Wiki for more detailed usage

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.2.5 222 2/5/2020
0.2.4 186 2/4/2020
0.2.3 186 2/3/2020
0.2.2 169 1/30/2020
0.2.1 293 1/29/2020
0.2.0 213 1/28/2020
0.1.1 326 1/26/2020
0.1.0 331 1/26/2020