How to turn on or off Wi Fi using Appium?

How to turn on or off wifi or data connection using appium?
If any one know it please share code.

Hi @chetan_thummar,

Try this:

adb -s shell “svc wifi enable”

Note: This can be used only for Android

Through command line? i want it to add in my test case.

http://appium.io/docs/en/commands/device/network/toggle-wifi/

Try this out.

@Prajith_KP : tried also, not working.

im using appium v 1.13.0
Device v 9

Then execute the above mentioned adb command using a process.
https://www.tutorialspoint.com/java/lang/runtime_exec.htm

Thanks for sharing. i will try this solution.