I would like to set the wifi status on ios and in order to do that, I need to to swipe up from the bottom the Control Center.
dimension = driverWrapper.getIo
Python version for iOS10 with Appium 1.6.5:
def swipe_up(self):
logging.info("swipe up")
sleep(1)
window_size = self.driver.get_window_size() # this returns dictionary
sleep(1)
el = self.driver.find_element(*self.configuration.CommonScreen.WEB_VIEW)
action = TouchAction(self.driver)
sleep(1)
start_x = window_size["width"] * 0.5
start_y = window_size["height"]
end_x = window_size["width"] * 0.5
end_y = window_size["height"] * 0.5
action.press(el, start_x, start_y).wait(100).move_to(el, end_x, end_y).release().perform()
sleep(1)
For iOS9 You need to change wait to 1000.