Answers to 20 of the Most Common Appium Interview Questions
We ask future employees a lot of Appium interview questions. Read the blog post to see our answers to some of the most common ones.
We at Experitest work with Appium a lot. For years we have worked to provide seamless integration into Appium to allow testers to create Appium automation in minutes. Naturally, this has led to us working with and hiring a lot of Appium specialists. In our interviews with potential employees, we find ourselves asking a lot of the same interview questions about Appium and its capabilities. We thought that it would be a good idea to prepare a Q&A about Appium where we can answer some of the most common Appium interview questions upfront. Read on and give yourself a head-start when interviewing for Appium related positions.
So without any further ado please have a look below at the most common:
Appium Interview Questions and Answers
Appium is an open-source test automation framework. We use Appium to automate mobile apps on Android and iOS platforms.
Native apps - Application developed for a specific platform.
Hybrid apps - Applications that have both Native and Web components but run as an application.
Web Application - Applications built to run on Browsers (In this case, Mobile browsers).
Installation of Android Studio for automating Android and XCUI for iOS automation.
Corresponding Language Runtimes for Appium Clients. An example for Java Appium Client JDK/JRE is a prerequisite.
At the heart of Appium tool, its key components are,
Appium Server - An HTTP Server that listens to the Appium Http-based clients and uses its UI Automator driver to translate automation commands to language which Android devices can understand.
Appium framework exposes Appium Clients for different languages like Java, Python. The Appium Clients list all of the supported languages.
Appium supports different drivers to automate various end platforms. UIAutomator2 Driver is used to support the Android Operating system.
Appium exposes a single API for automating mobile applications in different platforms.
Appium supports many different languages using which automation tests can be developed. API's follow similar overall concepts for automation.
Appium is based on Selenium's Web Driver protocol.
Appium provides end-to-end automation support for automation like Appium Server runtime, Appium Client libraries for development, and UI Inspector to find the location of UI elements.
Selenium is an open-source tool that allows automation for Web applications run in Browsers. Appium is used for automating mobile applications and web applications which run on mobile devices.
The commands are generally translated to the actual device which affects the performance.
No support available for testing on Android devices lower than version 4.2.
Decide on the programming language which Appium Client library supports.
Decide on the Testing framework of underlying development language. Example: TestNG for Java language.
Import the Appium Client library
Initialize the driver and pass Desired Capabilities (Session properties)
Locate the UI elements in the Mobile application. Use the Appium Inspector to get the location beforehand.
Execute the automation command on the Element.
Quit the initialized driver.
Desired Capabilities are keys and values encoded in a JSON object, sent by Appium clients to the server when a new automation session is requested. They tell the Appium drivers all kinds of important things about how you want your test to work.
Each Appium client builds capabilities in a way specific to the client's language, but at the end of the day, they are sent over to Appium as JSON objects.
deviceName - Identification ID for the mobile device connected.
platformName - Operating System for the Mobile device.
app - Path of the mobile application to be automated.
Appium inspector is an out of the box utility provided by Appium Framework to load a Mobile application and locate any element of the Mobile Application.
Elements of the Mobile Applications can be identified by some properties. Although there are some properties specific to the application, there are some which are more standard in nature. These standard properties are sometimes called Locators.
Following are the examples of Locators:
In general, XPATH enables testers to navigate through the XML structure of any document, and this can be used on both HTML and XML documents.
XPATH has a specific syntax to reach any element. This is a String-based identifier for any element.
Appium provides a 'FindBy' function where an XPATH string can be passed and the element is returned.
14. What is the difference between FindElement and FindElements and How can we check the availability of an Element?
Find Element is used to locate one specific element in an application UI screen and Find Elements can be used to locate multiple elements. We can use findElements functions to check the availability of elements.
Boolean iselementpresent = driver.findElementsByName("App").size() != 0
Also very important, findElement will throw an exception if no elements are found where findElements will not throw an exception and will return a 0 size array of elements.
There are times when some elements do not load on the application screen at the time of testing. Situations like these require a delay or wait for a specific test on the element in question.
Appium provides the following:
Implicit wait - Delay added for a specific time.
Explicit wait - Delay added for a specific condition.
Appium provides Explicit wait/Expected conditions for accomplishing this task.
WebDriverWait wait = new WebDriverWait(driver,20); wait.until(ExpectedConditions.visibilityOfElementLocated("")
The second option is to use the findElements as explain in the previous question.
Yes, it is possible.
Appium provides TouchAction API to perform Swipe action.
Example: TouchAction myAction = new TouchAction((MobileDriver)driver); Dimension size = driver.manage().window().getSize(); int startY = (int) (size.height * 0.85); int endY = (int) (size.width * 0.05); int coordX = (int) (size.width * 0.50); myAction.press(coordX,startY).waitAction(3000).moveTo(coordX,endY).release().perform();
Unrestricted X Path Usage - Over usage of XPATH as locators.
Neglected usage of Accessibility IDs: - The accessibility ID locator strategy is formulated to read a unique identifier for a UI element. For both iOS and Android, getting an element by their accessibility ID is the best method.
Query for every element visibility - Querying for each element's visibility is not a good idea as it affects performance. Only important and elements which may not get visibility should be queried.
SessionNotFoundException - Thrown when Appium Connection is disconnected or session not established.
ElementNotFoundException - Thrown when you attempt to find an Element and then the element is not Found.
WebDriverException - Thrown when the Driver is not existent.
Appium provides the server logs, which gives some hints on the error.
The tests can be generally debugged using the underlying Language/IDE.
Example: Java Remote debugging can be used to debug the tests.
Appium can be a complex and difficult test automation framework to learn and practice. That is why we ask potential employees so many Appium interview questions. This article is meant to give you some answers to the most common Appium interview questions. We hope it helps you find and succeed in your next role.