I am writing tests via Python + Selendroid. I am looking for way how to automate connecting Android device to Wi-Fi network. The product feature is: firstly we need to connect to X network, do something, and then connect to Y network. Does it possible to implement using Selendroid or Appium? Is it possible automate? If it's not, why so?
Asked
Active
Viewed 1,233 times
2 Answers
0
Yes it is possible to automate.I'm using Appium, so that i can use ANDROID 5.0.2 version also.
You need following things in your system
• Android SDK
• Java Development Kit 1.8
• APPIUM for windows
• Eclipse with ‘APPIUM-Web driver’ framework configured
• Android device (> 4.2 version) and its respective device manager should be installed in your system
Im using that with java so i mentioned JDK

Deepak_Mahalingam
- 454
- 1
- 9
- 21
0
You can resolve your problem using adb
and wpa_cli
, but your device must be rooted.
adb root
adb shell
svc wifi enable
wpa_cli -p /data/misc/wifi/sockets/ -i wlan0
add_network
set_network 0 auth_alg OPEN
set_network 0 key_mgmt WPA-PSK
set_network 0 psk "12345678"
set_network 0 proto RSN
set_network 0 mode 0
set_network 0 ssid "Qwerty"
select_network 0
enable_network 0
reassociate
status
For more information and examples refer Connect to Secure AP using WPA Supplicant

vldmkr
- 46
- 4
-
Thanks a lot. This is what i need. I have small issues with it: connecting to network was successfull, but Android system doesn't show it in Settings/Wi-Fi tab. But It is not so important :) – yar_resh Oct 30 '15 at 18:03