3 ms·
It seems you would be able to subscribe to events in your browser, and they could be sent from the browser back to your webdriver client without polling. This
by diroussel 6y ago
It seems you would be able to subscribe to events in your browser, and they could be sent from the browser back to your webdriver client without polling.
This is already possible in the CDP (Chrome DevTools Protocol), so I guess it would help modernise webdriver, and allow other browsers to do similar things.
For instance I have a test (written in webdriver.io) that loads my SPA, and subscribes to network events in ChromeDev Tools (via CDP, via Puppet, via webdriver.io). This means I can assert that all .js and .css files on the page loaded successfully with 200 status codes.
At the moment I can only run this test in Chrome.
- gsnedders 6y agoThere's also the Firefox Remote protocol, which is effectively a subset of CDP. Safari/WebKit has many of the same things exposed over the Inspector protocol, but it's neither public nor stable. (And is the ultimate origin of CDP, prior to the Blink fork.) There's a variety of things that you can do with an event-based protocol rather than a pull-based one, such as providing the means to intercept network requests or provide interactive debugging.