Connect to wifi access point using Appium - appium

I work for a company who provides wifi. I have some access point setup and I would like to write some automated tests that simulate the connecting to these access points.
So my test would be something like this:
Launch Device
Go to wifi settings on device
Select wifi you wish to connect to
Verify that the device is able to successfully connect to wifi. (When testing this manually on IOS, our splash page automatically pops up, on Android I generally need to open a browser and then the splash page is displayed)
Is it be possible to use Appium to do this? If so I would really appreciate if someone could provide some more information on how to do this.
Thanks!

You need to fire ADB Command to turn your Wifi On like this
adb -s $PHONESERIAL shell "svc wifi enable"
You can include/fire such command using Appium by including it within your test case (Java Code) Use this to know how to fire ADB Commands problematically

Related

Connect iOS Device to Mac and Log App Errors

Goal:
Connect iOS device (physical device) to macbook
Use Appium / IntelliJ / or any other software to capture app errors from the device
I run automation tests using simulated devices, however, it's proving to not be as affective as manual testing for I'm getting different results. What I want is to simply connect my device to my macbook, run something to log app errors as I interact with my test device.
My current set up to run automated tests:
Appium
IntelliJ - Using simulated devices (No longer wanting to do)
To view what's going on in the device, you'll need to use Xcode. The easiest way to obtain that is to use the Mac App Store application.
If you're able to build your app there is a lot more debugging you can do, but I'm assuming you're not able to do that based on what you've written and won't provide instruction on that.
Attach device
Launch Xcode
Click Window menu
Click Devices and Simulators
Unlock device
Click Open Console if you're looking to see live activity of the system (this is very noisy and unlikely to be of much use) or View Device Logs to see any crash reports.

Should I use Mac for testing iPhone or is Windows enough?

I managed to control my android device with both 'ADB' and 'Appium' on windows system.
Question is : Can I do the same for iPhone ? as i heard that it can't be done in windows platform and it isn't clear on net.
Also wanted to know if the iPhone sdk having tools like ADB 'command line tool' to do some things like make phone call , or press , or swipe ..
I trigger all of that with python scripts.
Thanks
For iPhone automation testing with the help of appium, you must need Mac machine.For iOS app testing using appium, the primary requirement is XCode which comes with only iOS Operating System which you can get only on MacBook/MacMini.
There is no tool like ADB for iOS. Whatever command you want to send to the device, all those needs to be sent through appium driver only. You can check the appium driver, there are lot of in built methods like hiding keyboard or launching app or opening notifications panel etc.

How to reset default app in Android Things OS?

Yesterday I started an Android Things project and I was testing the app using Android Studio. In order to connect to the device using adb.exe, I used the IP of the android device that I saw on the default OS's app (the starting screen). So, after the yesterday's testing it seems that my app is now the default app even if I don't have it connected to the PC.
The problem is that now I cannot see the device's IP address so I can connect to it using adb.exe.
Is there a way of going back to the default OS's app?
PS. The only solution I found is re-installing the Android Things OS.
To go back to default android thing logo screen.Uninstall the app using
adb uninstall <pkg name>
If you want to connect to AT without knowing ip use following command
adb connect Android.local
Also you can use serial cable to find ip of AT.
If you install multiple apps.AT will ask for your choice as below
uninstall the app using adb
adb uninstall <package-name>
if you have connected a keyboard to the raspberry pi board, you can go to the home screen by pressing escape button
(I don't have enough reputation to comment so I make an answer, sorry)
If you want to know the IP of your Raspeberry from your computer, you can use the ARP table.
From Ubuntu/Linux or Windows, just type arp -a
Your Android Things device will appear in this list with its IP !
If you don't need to uninstall your app, you can just close it:
adb shell am force-stop <package-name>
and of course you can close it from your app:
this.finish();
Also you can show your ip address in your app if you have screen. For me adb connect Android.local doesn't work.
An easy way is to log into your router and see all of the connected devices and pull the ip address from there. Really easy with Google Wifi

can we check internet connectivity of connected device with appium java

I am new to appium and started writing some basic scripts with java. I need a code which will check the device internet connectivity on which test going to perform.
This will be basic test before starting the actual test. Please help.
Thanks in advance.
I am not sure that you can verify the device internet connectivity directly from appium. However you can prepare small apk (I assume you use the Android device) that will verify that , see details here.
Or you may launch some browser (like Chrome) on the device and verify that the online page is received.

BlackBerry simulator settings for VPN

I want to test a project from the BlackBerry simulator, but our webservice runs on an external server that can only be accessed using the vpn from our PC's.
I can access the webservice from the Android simulator without doing anything special. However I cannot access the webservice from the BlackBerry simulator -- not even from the browser of the simulator -- though I am able to connect to other services on the web from the BlackBerry simulator.
What kind settings are there to fix this?
There's a network setting for the simulator that might be useful for situations like this. You could try manually assigning the vpn ip address you were given.
/ip-address={string}
IP address of the simulated handheld. This should be left blank under normal circumstances. If running on a PC with multiple IP addresses, one can be specified here to cause the simulator to use it.
Cheers
Ray
Ok...anyone bumping on the same problem...
Append ";deviceside=true" to the URL from which data is to be fetched

Resources