Reputation: 1027
Is there a way currently to programmatically pull a coverage report from Chrome while Chrome is running under selenium or other automated control software?
Upvotes: 2
Views: 622
Reputation: 1225
Now, Selenium only has access to the browser context via execute_script
aimed to execute window.__coverage__;
to collect the Front-end's coverage data. So, you need to instrument your source code using nyc
and parse the returned value.
Upvotes: 0
Reputation: 25610
From looking at this article, there is a reference in the comments that there's no way to export this data right now but there is a feature request.
There's another article here that talks about how the feature works and in the comments someone asks this same question. The response was that there's an API here that maybe you could take advantage of using a Chrome extension.
Upvotes: 1