Service worker support
browser.network.traffic isn't working for traffic that happens in service workers. Has this been considered? I could put together a pull request if pointed in the right direction for implementing this feature.
@johncoates-st you could check https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker/ and then:
-
Add
ServiceWorker.enablefeature in https://github.com/rubycdp/ferrum/blob/main/lib/ferrum/page.rb#L357. Though I'm not sure about behavior or if it even fits well network domain. -
Run one of the specs for network with log debug like:
FERRUM_DEBUG=true rspec spec/network_spec.rb:5and see how CDP communication works for Chrome. -
For service workers I think you need to add one more endpoint to our test application with some custom JS, and also test the communication.
Thanks for the references and guidance @route
Just created a draft PR based on your guidance.
- https://github.com/rubycdp/ferrum/pull/391