I am testing a Javascript application in Chrome browser. I want to load the page, and once loaded I would like to switch the browser to offline mode.
Note that I DON´T want to start the browser in offline mode as mentioned here: Selenium: How to set browser in offline mode?. Instead I want to start the browser connected and then switch it off and a specific moment.
Note that I don´t want to do it manually with the mouse, because this is for creating an automated test with Selenium. So I need to be able to send the instruction to go offline somehow with a script.
Is there anyway using Chrome to do that? could I modify the browser configuration executing a javascript? (probably not for security reasons but still wondering)
Thanks very much for your help.
