title: Chrome Dev Tools API & Selenium WebDriver
body: <p>I am experimenting with <a href="http://docs.seleniumhq.org/">Selenium Web Driver</a> for automating my browser integration tests. I see that <a href="https://developers.google.com/chrome-developer-tools/">Chrome Dev Tools</a> comes with a <a href="https://developers.google.com/chrome-developer-tools/docs/console-api">console API</a> for invoking certain dev tool functions from inside JavaScript.</p>
  
  <p>Ideally, from inside my Java/JUnit integration test, I could start the Chrome Dev Tool memory profiler (and perhaps some other tools), run my WebDriver tests (instantiating a Chrome browser instance, manipulating DOM elements, etc.), and then stop the profiler, then inspect the profiler's results to see if there are any memory leaks.</p>
  
  <p>Is this concept even <strong>feasible</strong> or am I way out to lunch? Why/why not?</p>
  
  <p>It seems like the API already has a <code>console.profile()</code> to start a profiling session, and a <code>console.profileEnd()</code>. So in theory I could have WebDriver invoke these two methods and run tests in between them.</p>
  
  <p>I think the missing link is then programmatically interacting with the <em>results</em> of the profiling session...</p>