Showing posts with label mobile automation. Show all posts
Showing posts with label mobile automation. Show all posts

We learnt how to use UI Automator Viewer in PREVIOUS POST to locate and get properties details of android native software app's any element. Now we need to learn what are the different ways to locate elements of android software app and how to determine those locators to use them in test script. Most successful ways to locate android software app's elements are XPath, ID, Name And className so we will learn them rights now. Also we can use findElements method of webdriver to locate element of android app.We will use UI Automator Viewer to locate android app element and get it property and hierarchy detail.

We will use below the sample APK file for testing in different appium software automation test examples. You can download a sample APK file for testing directly from here to use in appium software automation test examples. All these are just sample APK file for appium testing and you can use them in appium automation tests.

Selecting item/value from drop down is needed in android software app as most of the apps contain drop down. Earlier we learnt how to select value from spinner in android appium software test which is opening in direct list in THIS POST. Now let's see another example of how to select value from drop down list which is opening in popup.

In previous step, we learnt about how to locate android native software app elements by XPath, ID and className and We will learn how to run your first android software app test in next step. But before creating your first android native software app, You must know how to find package name and launcher activity name of your android app which you are going to test using appium. Because we need to provide package name and launcher activity name of android software app in test script to launch it in device or emulator. This post will describe you how to get package name and launcher activity name of.APK file using different ways. More 2 methods of finding package name and launcher activity name are given on THIS PAGE.

Appium Tutorial : Mobile software application's craze is increasing day by day. Also peoples are converting there current running software web sites in mobile version and creating apps for mobile application software. For testing point of view, It is very important for us to learn mobile's software application automation testing to stay connected with new technology. Appium is mobile application software testing tool which is currently trending in mobile automation testing industry.

Appium Tutorial

Earlier In previous post, we learnt how to interact with android mobile gesture to perform drag and drop by generating action chain using TouchAction class of Webdriver 3. Swiping is another common action for any android mobile app. As you know, We can swipe horizontally(left to right or right to left) and swipe vertically(bottom to top and top to bottom) In android mobile app. Here I have described how to swipe horizontally and vertically In android mobile app using driver.swipe() when running swipe in appium automation test. Follow me throughout this article to learn how to swipe in android app using appium.

ANDROID_HOME : You must need to set android_home environment variable in order to run appium test. In previous post, We learnt about how to download and install android SDK software and its different packages in windows. In order to use android environment to run appium software automation tests, You must need to set ANDROID_HOME and path environment variables for describing path of android SDK folders to your operating system. Bellow given steps will explain you how to set ANDROID_HOME and Path Environment Variables in windows for android SDK software.

This appium automation tutorials will take you from beginning level to advanced level in android software app automation testing. Appium software testing tool is freeware mobile automation testing tool using which you can automate native, hybrid and mobile web software apps of android and IOS. If you wants to make career in mobile automation software testing then appium is best tools for you. Now a days, many software companies has started using appium as a mobile automation testing tool so it is very important for mobile test engineers to learn appium for better future and growth.

appium tutorial

As per my view, Nearest 40 to 50% websites will be converted in mobile app in next 5 to 10 years as usage of mobile apps is increasing day by day. At present, It is great opportunity for each mobile tester to learn appium very quickly so that he/she can work on appium in upcoming days.

I have prepared bunch of appium tutorials for those beginners who wants to build their career in mobile automation testing industry. Go though bellow given appium tutorials steps by step to learn appium automation very quickly.

36. What is command to start appium from command prompt?
Answer : "node appium" command from node_modules folder of appium will start appium server from command prompt. View start appium from command prompt example.

37. Is it possible to start and stop appium server programmatically?
Answer : Yes we can start appium server programmatically too. I have described two different methods on how to start and stop appium server programmatically. You can describe any one from them. View Method 1 and Method 2.

31. : Which method is used to perform scroll down to text in appium.
Answer : You can use scrollTo() method to scroll till text. View scroll down to text example.

32. : Is it possible to perform multi-touch action in appium test?
Answer : Yes, We can perform multi-touch action action in appium automation test using MultiTouchAction and TouchAction class. We can create touch action chain using MultiTouchAction and TouchAction class. View appium multi-touch action example.

26. : Can you tell me usage of findElements() method?
Answer : We can use findElements() method to get the list of elements from page.
Example : Supposing there are 5 buttons on page with same class name. In this case, We can use findElements() method and provide reference of class name in xpath(Example : findElements(By.xpath("//android.widget.Button"))). So it will return list of all button elements. Then we can use get() method and provide reference of button's index to locate specific button(Example : findElements(By.xpath("//android.widget.Button")).get(0)). View findElements() Example.

21. : Which android version is supported by appium?
Answer : Appium support Android 17+ API level versions only. You need to use selendroid if you have older version of android API level. View MORE DETAILS.

22. : How to configure appium project in eclipse?
Answer : Appium project configuration steps are given on THIS PAGE.

16. : Can you tell me few appium limitations?
Answer : Limitations Of Appium are described on THIS PAGE.

17. : Tell me different ways to locate android app elements in appium automation.
Answer : You can locate android app's elements using bellow given different ways.
  1. XPath
  2. ID
  3. Name
  4. className
  5. AccessibilityId
18. : Can you tell me different ways to locate element by XPath?
Answer : You can create XPath in different ways to locate same element. Different XPath examples are given on THIS PAGE.

11. : How to configure android device to run software test using appium in devices?
Answer : In order to run software automation tests using appium in android device, You need to enable USB debugging in your android device. VIEW DETAILS on how to enable USB debugging in android device.

12. : Tell me the command name for windows to verify that android device is connected with PC.
Answer : You can run adb devices command in windows to make sure that device is connected properly with PC to run appium tests on it.


6. : What is Node.js?
Answer : It is cross-platform runtime environment which is used to develop server-side software web applications. It is open-source so you can use it without any cost.


7. : What is Desired Capabilities and how it is used in Appium software testing tool?
Answer : Desired Capabilities is bunch of keys and it's value. Using this set of keys and values we can tell to appium server that what kind of automation session we are going to create. Example : If you set platformName = Android then appium will understand that you wants to create automation session to run test on Android.

1. : What Is Appium?
Answer : Appium is an open source mobile application automation testing tool. Using appium, We can automate native applications, Mobile web applications and mobile hybrid applications on Android and IOS platforms. VIEW MORE DETAIL

2. : What are the prerequisites to install appium in windows?
Answer : You need to install few software before install and use appium in windows. Bellow given software are required to install appium in windows.

24Sometimes you need to press and hold(long press) an element for few seconds to get required result In your android software app. In this case we can use longPress(org.openqa.selenium.WebElement el) method of TouchAction class In appium automation test. Earlier we have used longPress method to generate action chain of DRAG AND DROP, SWIPE ACTION and MULTI TOUCH ACTION. Here I am presenting simple example on exact usage of longPress method of TouchAction class In appium software automation test.

Automating star rating bar in appium android software test is very easy, There will be star rating bar in many android software applications. Generally star rating bar is used to rate products, services in eCommerce android software applications. Mostly you will see 3 star and 5 star rating bars in such android software applications. If you wants to automate star ratings in appium android test then it is little tricky but very easy and we can do it using TouchAction class. Let's see how can we automate 3 star and 5 star rating bars of android software application using appium with example.

Selecting radio button of android software app in appium automation test is same action as selecting check-box as described in my Earlier article. Only difference between check-box selection and radio button selection is you can select only one radio button at a time from given list of radio buttons but you can select all check-box from given list. So it is easy to select radio button of any android software app using appium automation test. Let's take simple example to understand how to select radio button of android app In appium software automation test.

Retrieving all values from drop down list of android app software in appium software automation test is little tricky task but not hard. You can view how to SELECT VALUE from drop down list's popup in appium test. We can use findElements() method of selenium webdriver to locate and get all values from drop down list.