I am trying to test out my site's offline behavior using selenium and chromedriver. I call
driver.setNetworkConditions({offline:true, latency:0,throughput:0}) returns ok and does not return an error.
However, it appears that this call only sets the network conditions for the main thread not the ServiceWorker too. I can load pages from my site which not cached by the ServiceWorker when the offline network condition is set. I would expect to see my ServiceWorker instead display my offline page. When I try to load
google.com, I get an error that the browser is offline like I would expect. I believe this is showing that the main thread is set offline as expected.
Is setNetworkConditions() only being applied to the main thread by Chromedriver? Is there some way to apply setNetworkConditions to the ServiceWorker as well using chrome driver?
Thanks,
Henry