Appium: How to turn off wifi on android and ios device ?
Turn off Wifi For Android NetworkConnectionSetting con=new NetworkConnectionSetting(false, true, false); con.setWifi(false); ((AndroidDriver<WebElement>)automationDriver.appiumDriver).setNetworkConnection(con); For Ios int height = appiumDriver.findElementByClassName("XCUIElementTypeWindow").getSize().getHeight(); int width = appiumDriver.findElementByClassName("XCUIElementTypeWindow").getSize().getWidth(); appiumDriver.swipe(width/2, height-3, 0, -200, 50); Thread.sleep(1000); appiumDriver.findElementByAccessibilityId("Wi-Fi").click(); Thread.sleep(1500); int tap_startX= (int) 341.2; int tap_startY = (int)451.3; int tap_finger= 1; int tap_duration=2; appiumDriver.tap(tap_finger, 100 , 100 , tap_duration ); Thread.sleep(2000); Turn on Wifi For Android NetworkConnectionSetting con=new NetworkConnectionSetting(false, true, false); con.setWifi(true); ((AndroidDriver...