Hi All,
I would like to run my Tests on different Network types such as Airplane mode/Data only/WiFi only.
While trying to implement few methods I keep getting exceptions or the method does nothing.
Method I’ve tried and failed (driver = AndroidDriver):
driver.setConnection(Connection.AIRPLANE);
Assert.assertEquals(Connection.AIRPLANE, driver.getConnection());
org.openqa.selenium.WebDriverException: unknown error (An unknown server-side error occurred. status='false'. Failed to complete internal method: 'setNetworkConnection args: [airplane_mode, true]', details: Failed to preform device setConnection: airplane_mode to true. device 8a1448c7 failed to executeShellCommand settings put global airplane_mode_on 1. null) (WARNING: The server did not provide any stacktrace information)
Found this one on the Web but it doesn’t even compile (1 = Airplane mode):
driver.setNetworkConnection(1);
Do you guys have any solution?
Cheers!