How to get current network (WiFi/2G/Airplane) using appium?

I need to know the current network (WiFi/Data/Airplane). How can we achieve this using appium?

I have a test summary report in PDF format. I need to mention the connectivity which I used for testing in that report, it should automatically fetch from device network.

Android or iOS ?

Only for android
http://appium.github.io/java-client/io/appium/java_client/android/HasNetworkConnection.html

1 Like