I was trying to turn the flight mode on and off on real device iPhone 8.0
pry(main)> toggle_airplane_mode
post /appium/device/toggle_airplane_mode
Selenium::WebDriver::Error::UnknownError: Not yet implemented. Please help us: http://appium.io/get-involved.html
from /Users/gireesha/.rvm/gems/ruby-2.1.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/response.rb:52:in `assert_ok’
toggle_airplane_mode is currently available on Android only. As pointed out, this is a server limitation and not Ruby specific. I recommend opening an enhancement request on GitHub if one doesn’t already exist.
If you can’t see the elements (iOS doesn’t allow automating system Settings) then you may have to fallback to either relative coordinates or image recognition (this is an exercise left to the reader).
@saikrishna321, I’m facing same issue,cannot select airplane mode option. i’m using java, can you please share the code on how to select the airplane mode or wifi enable/disable.
on ruby I use %, so I can swipe from 99,9% of height. In java I think it just accepts direct coordinates, so you probably have to get the height and then use that value to swipe up. Just an idea, because I never tested in java.
It doesn’t work in java. When I try to swipe from bottom most position, it just scrolls in the app. Since java take ‘int’ co-ordinates, if I increase the size by even 1, it says not found and exits. I guess we can not pull the control bar using java.