How to launch settings page on real ios device using appium? - selenium

I know that accessing built-in apps of real ios device is not directly possible. But we can access them using some launcher apps like for safari we have safari launcher. Similarly can we have settings launcher app to launch the settings app on real ios device. If so, where can I find the launcher app or if possible how can we create it??
Any other idea is also appreciated.
Thanks in advance.

try to launch to com.apple.Preferences
if not try this:
in the capabilities set app as setting:
DesiredCapabilities cap = new DesiredCapabilities();
......
cap.setCapability ("app" , "settings");
driver = new IOSDriver(....);
it should do the work!

I think i have found an answer to this. We can create a settings Launcher app with the help of xcode and can handle all the elements in the settings page. Infact we can create launcher apps for all the native apps of the ios real device.

Related

ios appium automation queries

Can we perform automation on preinstalled app like Facebook on ios real device using appium without having ipa/app file?
Can we perform automation on real ios device without having developer team id for a ios app for which we have ipa/app file?
Yes, you can specify the app bundleId in the desired capabilities and attach Appium to the pre-installed application.
No. You need to build and sign the appium-webdriveragent app with your developer certificate to be able to install it on the real iOS device.
Yes you can automate pre installed apps in your phone. But make sure following configurations are already done:
"noReset" capability should be set to true. It won't install your app on every run.
You will need apple developer account if you want to automate it on Real Device. If you are running on simulator, developer account is not needed.

How to set fake GPS location in Appium

I saw that there is the method to set the Location driver.setLocation(Location);
But which driver do I need for this?
And is this usable for Android and iOS?
For emulators or simulators, which are the easiest to configure, use the following capabilities.
Android
gpsEnabled: true
iOS
locationServicesEnabled: true
locationServicesAuthorized: true
It is required to provide the bundleId capability for the latter to work.
For real devices, things are more tricky. In Android you should be able to enable mock locations in the Developer Settings, however, I haven't been able to put it to work using Appium setLocation method. This question invoking Appium settings app through adb might help you in that regard: https://android.stackexchange.com/questions/35716/is-it-possible-to-set-devices-latitude-and-longitude-using-adb-shell.
Finally, for iOS, you can use a run configuration with a fake location from XCode, but I haven't found any method to programatically run the app with a fake location from an Appium automation.

"Searching for devices..." when I try to run a new nativescript-vue project?

I create a nativescript-vue project which following the official start guide here
But when I try to start and preview it on the browser...Nothing I can get from the terminal except "Searching for devices..."
I'm new to it, can someone give me some help on it?
nativescript-vue is searching for a mobile devices connected to your environment (or emulators). Nothing will happen in the browser as this is a mobile development framework. To test it attach a real mobile device (Android or iOS but for iOS, you will need MAC and provision profiles & certificates) or create an emulator/simulator and give it a go.

Appium: How to get current window?

I have Appium 1.4.13
IOSDriver<MobileElement> driver = new IOSDriver<MobileElement>(appiumUrl, desiredCapabilities);
How do I get current window (UIAWindow)? How do I get all elements on that window?
hi Artem appium tool only automates the app not android functionalities so you cant retrieve like home, settings window just like selenium does browser automation not the windows system (for that we use external tools like AutoIt and Sikuli), To retrieve app handles we use getcontextHandles() method to know we are in native app or Web view... hope this helps

Any recommendation/suggestion on best practice to develop app using PhoneGap for Android or iOS?

Also, is there a way to test those webapp in a webkit based browser such as chrome (with phonegap plug-in maybe) on a PC first before compiling it to test on a device or emulator?
The key reason is that trouble shooting mal-formed html, javascript code is very difficult on a device or emulator. You can not view the js console to see all error. The Weinre is great, but it can not spits out the error browser complains when initially loading the page.
It will be great if we can validate the html, js, css app first before diving deeper into testing on Android device. i.e. a way to weed out some simple problems before getting into more complicated deeper problems.
Any experience/suggestions/ideas/pointers are greatly appreciated.
Paul> Seems promising. Will try and report back. It seems knowledgeable in phoneGap mob dev. What are the key steps would you go through to dev a phoneGap mob web-app?
Ripple is a Chrome plug-in that includes a PhoneGap mode.
For JavaScript static validation, the PhoneGap Android Eclipse AppLaud plug-in includes a JSLint mode.
I would recommend you use Safari. In your Safari (on Mac) go to Settings (on PC) goto preferences -> Advanced -> check on "Show Develop in Menu bar".
Now you'll find in the Menu "Develop" "User Agent". There you can change the UserAgent identification, that will be send to the server. You can then change it to iPhone.
This way you can at least test it for iOS.
Hope that helps somewhat.