I'm doing research on taking code coverage metrics for the JS code using Istanbul. Currently, what I'm doing is using a before_teardown hook to read the `window.__coverage__` object and store the result in a file to process it later.
This is not ideal because there are some use cases I will miss, for example:
- a form submission that changes/refreshes the page
- a link that takes the user to a different page
- a call to `visit` during the flow of a test
I'm not sure if something like that is even possible, I understand capybara can control the browsers with specific drivers but I don't know if it can use the drivers to listen to events too.