21. How Many Types Of Apps Do You Know?
Answer: Mostly there are three kinds of apps in use.
Native apps are those which are built using the iOS/Android SDK.
Mobile web apps are the ones which are getting accessed via the mobile browsers.
Hybrid apps fall into the category which wraps around a <webview>. It’s a native control to enable interaction with the web elements.
22. What Would You Prefer To Test On Real Devices Or Use Simulators/Emulators?
Answer: It’s preferable always to test the applications on real devices. However, due to the increasing number of devices, it’s quite difficult to test the applications on every new device, thus it’s much better to use emulators in such cases. Emulators configuration is easy and quick.
Hence, if the device is available it’s better to use the device only otherwise go for Emulator.
23. How Do The Tests Run On Simulators/Emulators?
Answer. The limitation of disconnecting from the devices would never occur with the emulators. They will remain attached to the ADB. Running entirely in a virtual world wouldn’t come without some limitations. Your tests would run slow as the emulators consume a lot of memory. Even they might behave intermittently during the execution.
24. Which Are The Selenium Commands To Use With Appium?
Answer: There are a no. of Selenium commands to operate with Appium tool.
Locate commands using ID or class names.
Raise events on elements e.g. Click().
Text commands like type().
Get/Set element properties.
Switch context between different web views like switching <iFrames> in Selenium Webdriver.
Commands to manage alert boxes.
25. Can we perform Parallel tests using Appium.
Answer: We can set multiple Android sessions on a single machine using Appium. All you have to do is to start multiple Appium servers with different flags. There are number of important flags for automating multiple android session on the system:
-p : the main Appium port
-U : the device id
-bp : the appium bootstrap port
–chromedriver-port : the chromedriver port (if you are using webviews or chrome)
–selendroid-port: the selendroid port (if you are using selendroid)
For automating 2 devices with IDs 12345 and 54321, you need to use the below commands to achieve parallel testing.
node -p 4492 -bp 2251 -U 54321
node -p 4491 -bp 2252 -U 12345
As long as your Appium and Appium bootstrap ports lie in the range of 0 to 65536, the only requirement is that these port should be different so that the appium servers listen to different ports. You need to make sure that you use -u flag with the correct device id. Appium can connect to unique device in this way only.
For chromedriver or selendroid, you need to set different port for each server.
# In order to perform parallel testing on iOS device, you have to use Sauce since appium doesn’t have a direct support for parallel testing on iOS devices.
26. What is Appium Inspector?
Answer: Similar to Selenium IDE record and Playback tool, Appium has an “Inspector” to record and playback. It records and plays native application behavior by inspecting DOM and generates the test scripts in any desired language. However, Appium Inspector does not support Windows and use UIAutomator viewer in its option.
27. What Are The Advantages Of Using Appium?
It allows you to write tests against multiple mobile platforms using the same API.
You can write and run your tests using any language or test framework.
It is an open-source tool that you can easily contribute to.
28. What Is The Appium Philosophy?
1. Test the same app you submit to the marketplace.
2. Write your tests in any language, using any framework.
3. Use a standard automation specification and API.
4. Build a large and thriving open-source community effort.
29. What Are Main Advantages Of Using Appium On Sauce Labs?
You save the time it takes to set up the Appium server locally.
You don’t have to install/configure the mobile emulators/simulators in your local environment.
You don’t have to make any modifications to the source code of your application.
You can start scaling your tests instantly.
30. List Out The Appium Abilities?
Answer: Appium abilities are:
Provides cross-platform for Native and Hybrid mobile automation.
Support JSON wire protocol.
It does not require recompilation of App.
Support automation test on physical device as well as similar or emulator both.
It has no dependency on mobile device.