How to disable internet during web test selenium? WebDriver, Java
<p>I need to disable internet during web automation test using selenium webDriver, then test UI and enable connection.</p>

<p>I'm using selenium (PageFactory) to create scripts, maven to build project... My test case is - I need to start selenium script (open browser - login) then disconnect internet then test that error appear on web site and then connect again. I need to do it on different OS (Windows/Mac) and browsers 
Thank you for any help.</p>