altus_nel
11 years agoContributor
Enabling WiFi on Android devices
Hi there,
TC very nicely allows you to either disable / enable to the the WiFi connection of the device.
Now, disbabling the connections (Mobile.Device().Connections.WiFiEnabled = false;) disables the wift and all is well.
The problem i'm facing is that when the WiFi is enabled again (WiFiEnabled = true;) then i get a message: "An attempt to change the state of the device's WiFi adapter failed. The WiFi adapter is still off."
The problem with this is that I am not experiencing any error. The WiFi is turned on successfully on the device.
Even when putting the method in a try / catch block, the "exception" is not caught and the scripts exits (since stop on error is enabled).
This has been observed on a Samsung Galaxy S3 and a Note 2
Is there some sort of workaround for this? Or am i doing it wrong? :)
Thanks!
TC very nicely allows you to either disable / enable to the the WiFi connection of the device.
Now, disbabling the connections (Mobile.Device().Connections.WiFiEnabled = false;) disables the wift and all is well.
The problem i'm facing is that when the WiFi is enabled again (WiFiEnabled = true;) then i get a message: "An attempt to change the state of the device's WiFi adapter failed. The WiFi adapter is still off."
The problem with this is that I am not experiencing any error. The WiFi is turned on successfully on the device.
Even when putting the method in a try / catch block, the "exception" is not caught and the scripts exits (since stop on error is enabled).
This has been observed on a Samsung Galaxy S3 and a Note 2
Is there some sort of workaround for this? Or am i doing it wrong? :)
Thanks!
- Hi Altus,
Our QA team didn't face this error when testing the product.
Could you please follow the steps below to help them better understand what is going on on your device?
1. Run Command Prompt on your computer.
2. Navigate to the "<Android SDK>\Platform-tools\" folder. To do this, type:
cd <your_drive_letter>:\<path_to_the_Android SDK>\Platform-tools\
3. Execute the following command with Android Debugging Bridge:
adb shell logcat -c
4. Launch your test in TestComplete and reproduce the issue.
5. Execute the following command with Android Debugging Bridge to generate the report:
adb shell logcat -d > dump.txt
The "dump.txt" file will be created on your machine where the "adb.exe" executable file is located.
6. Send the generated file to our Support team.
Thanks in advance.