I’m looking for a possibility to easily access and list all resources loaded after a web page document has started to load: scripts, images, stylesheets, etc. using a headless browser. I'm interested in the files' url, status code and type etc..
Think of a way to programmatically access the information the Network
tab (developer tools) gives you:
Does anyone know of a Ruby library to help me with this or — even better — if there’s a way to achieve this using Capybara(–webkit) ?
Update
It seems that Poltergeist has a method called network_traffic
which does what I’m after. Haven’t had the time to research it yet, though. I'll report back once I do.