How can I switch ON/OFF AIRPLANE mode and wifi using Appium ?
Selenium has below option:
NetworkConnection mobileDriver = (NetworkConnection) driver;
if (mobileDriver.getNetworkConnection() != ConnectionType.AIRPLANE_MODE) {
// enabling Airplane mode
mobileDriver.setNetworkConnection(ConnectionType.AIRPLANE_MODE);
}
But when I create AndroidDriver object and typecast it with above code, getting error that such typecast is not possible.
Any other way ?