diff --git a/README.md b/README.md index 90a2623252af5eb442519e68d2257573461142f2..c969280655d08fd1d9cfeca1d33d8cab0e259fc7 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,19 @@ # ChromeDevTools C# Library to interact with the Chrome Developer Tools. +```c# + chromeSession.Subscribe<Protocol.Page.DomContentEventFiredEvent>((o, e) => + { + var domContentEvent = (Event<DomContentEventFiredEvent>)e; + Console.WriteLine("DomContentEvent: " + domContentEvent.Params.Timestamp); + }); + + chromeSession.SendAsync(new NavigateCommand + { + Url = "http://www.google.com" + }).Wait(); +``` + ## About This library is C# API that enabled interaction with the Chrome Developer Tools. When the Chrome Developer Tools are started, the chrome process starts a server. The Chrome Developer Tools UI communicates with this server via Web Sockets. So can you. In fact, everything in the Chrome Developers Tools UI is available to you via JSON, by default. This library makes it available to you in C#. @@ -55,4 +68,4 @@ If you didn't read the entire README (I don't blame you, I wouldn't), I've inclu * Here's what the Chrome Team has to say about the Developer Tools protocol (it's not much) * [https://developer.chrome.com/devtools/docs/debugger-protocol](https://developer.chrome.com/devtools/docs/debugger-protocol) * Some cool apps that other developers have built using the Chrome Debugging Protocol - * [https://developer.chrome.com/devtools/docs/debugging-clients](https://developer.chrome.com/devtools/docs/debugging-clients) \ No newline at end of file + * [https://developer.chrome.com/devtools/docs/debugging-clients](https://developer.chrome.com/devtools/docs/debugging-clients)