Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Reusability of Cucumber steps

Many times it has been noticed that some set of steps were required in another cucumber step. One way is to write previous steps again in the required cucumber step but this violates the “Reusability” feature of cucumber. So, the best...

String Literals and Character Classes of regular expression

String Literals: The string literals is the most basic form of pattern matching of regular-expression. For example if regular-expression is srinivas and input string is srinivas then match will succeeds. Enter the regex: srinivas Ente...

Cucumber Feature file in different languages

There are many applications that run on different geographic locations and teams from locations also work on the same project. It may be possible the different team members are comfortable in writing feature files in different languages. So, cucu...

Step Definitions in Cucumber

Cucumber is a command-line tool that reads specifications from plain-language text files but cucumber itself does not have any idea as how to execute the scenario steps. Cucumber needs step definition to convert Gherkin step into some desired act...

Gherkin keywords

Gherkin is a Business Readable language that Cucumber understands and describes the application flow. In cucumber each line should start with a Gherkin keyword. Gherkin provides the following keywords:   Feature Scenario Scenario...

How Cucumber Works ?

Cucumber a command-line tool has scenario inside the Feature file which contains a list of steps for the Cucumber to work through. Cucumber follow some basic rules or syntax called Gherkin to understand these feature files.   Since eac...

How to get iframe contents inside a jquery selector

This has been noticed that many times we try to locate an element and we do not get the element. The syntax of jquery selector is also correct but it is unable to find the element. In that case first take a look on entire HTML of the page and the...

Xpath in Selenium

The query language which is used to locate elements in XML document is "xpath". XML is the context in which xpath exist. One or more elements exists inside the XML document. Every element must have a start and end tag if it contains so...

How to Find or Validate an Email Address using regular expression

Sometimes we need to validate an email address using regex in our script in automation. In the below code I have used "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@" + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$" pattern whic...

Matcher class and Matcher object of Regular Expression

Matcher object can be created after invoking the matcher methods which interprets the given pattern and perform the match operation. Matcher class implements MatchResult interface. Matcher class do not have public constructor. Below are the me...

Pattern Class and Pattern Object of Regular Expression

A compiled representation of an object which would be created after invoking one of it’s method of Pattern class is known as pattern object. These methods accept regular expression as an argument and matches with the given input. This class...

Soak Testing

What is Soak Testing?   This is a non-functional testing. In the Soak Testing, the System under Load (SUL) is checked that it can face an immense/large volume of the load for an extended timeframe.   Soak Testing is only a k...

What is regular expression?

Regular expression or Regex is an API which is used for pattern matching and it basically defines a search pattern of input.  We can also search, edit or manipulate text or data from regular expression. Let’s suppose if we need to defi...

Locators in Selenium

Use of Locator mostly depend on your application under test. There are different type of locators in Selenium: ID Name Link Text LinkText PartialLinkText Xpath CSS Selector   ID : This is most common and effic...

How to configure extra plugins in jmeter ?

There are many times we have to use some features in Jmeter that are not present in Jmeter, so we have to install some additional plugins to use those additional features. These features can be like JSON Path Extractor, AutoStop listener, etc. ...

gherkin.parser.ParseError in cucumber feature file.

 I created the below scenario in a cucumber feature file and when I executed the scenario then I got gherkin.parser.ParseError Scenario : The user should be able to login for correct credentials Given I am at the Home page ...

How to dismiss the keyboard in appium using Java?

When we enter any text in textbox through sendKeys() then after entering the text also the keyboard is not dismissed. If we want to locate the element on the screen then the element could not be located, so to locate the element on screen, the ke...

How to accept Use current location permission popup in Appium?

There are some applications that requires user location when they are launched for the first time. The application requests to accept or reject the location. A popup appears and it should either be accepted or rejected. Its very difficult to loca...

Switch from one application to another application at runtime in Appium

There are many times we have to switch from one application to another while in the middle of execution. In this case we have to switch to the second application and then perform some action and then again return back to the previous application....

How to install Appium on Windows

Appium is an open source tool for mobile automation. Appium is very user friendly and a powerful tool. The best part of this tool is to write test only once and then execute on different devices. This tool is also platform independent and we can ...

How to perform drag and drop in Appium ?

Drag and drop functionality is a very important functionality and we can easily perform through Appium. DesiredCapabilities capabilites = new DesiredCapabilities(); capabilites.setCapability("device", "Android"); capabilites.setCapability...

How to invoke installed application through appium ?

The first step after the starting the Appium server is to launch or invoke the installed application through the script. First we should set the desired capabilities and then launch the application. DesiredCapabilities capabilites = new Desire...

How to save Appium server logs ?

The logs that are generated on the Appium server gets removed as soon as we close the server. If there is a need to study the logs to find the root cause of any issue then we have to save the logs before closing the server. Appium provides a way ...

How to capture screenshot in Appium ?

There are many times when we run our testcases there might be the possibility that testcases may fail and when the testcase may fail then the screenshot of the screen should be captured. We should use the following code to capture the screenshot:...

How to clear field in Appium ?

There are many times that we have some fields that were prefilled and we have to pass some value in the field. So, we first have to clear the textbox and then click the pass the desired text in the field. Suppose we have to check the login funct...

How to run an application in background in appium ?

On some action there might a possibility that the application may take some extra time to execute. So, we may execute that application in the background. Appium provides a method through which we can run any application in background. runAppInBa...

How to remove any application through Appium ?

Appium also provides to remove any application from the device programmatically by just passing the the package name of the application. Suppose that we have test many applications on the same mobile device and the capacity of the device is not...

How to reset any application through Appium ?

There are many times we have to reset application at some point. Lets take the example of browser in the mobile device. Suppose that we are navigating in the application and at some point on clicking the link it should opened in the browser and i...

How to install application programmatically in Appium ?

There are many times there is a need to install the application programmatically in our testcase. The first thing that we should do before installing the application is to check that whether the desired application is installed in the device or n...

What is bundle Id in Android ?

Bundle Id is basically the package name of the android application and it the unique identifier for all the android applications. Bundle id should always be unique ie the two application should not have same bundle id and if the bundle id is same...

How to lock the mobile device screen in Appium ?

The mobile device screen can able to locked programmatically. Appium provides a method through which we can perform the same. lockScreen(int seconds) The argument should be an integer value ie the number of seconds we want the screen to be in l...

How to perform the screen rotation in Appium ?

Many times the application screen has to be rotated to automate any testcase. Most of the applications opens in portrait mode and if there we have to verify something in landscape mode then we cannot rotate the screen manually in the middle to an...

How to send any character in uppercase in Appium ?

Appium provides keycodes for the alphabets only in the lowercase. If we have to send any alphabet in uppercase then we have to send the keycode of that alphabet with the shift keycode. Practically also we first press the shift key and then press ...

How to scroll to a specific element in Appium ?

Many times there is a requirement in the test step to move to a specific link, keyword, etc. So, we have two methods through which we can directly scroll to the desired element. The two methods are as follows: scrollTo(String text) scrollTo...

How to send a key event to the device ?

There are two methods we use to send the key events: sendKeys() sendKeyEvent(int) Every keyboard event is associated with an integer value and we have to pass the integer value in the method to perform the desired action. Suppose if w...

How to locate elements through UIAutomatorViewer ?

In my previous blog I have explained about Methods to locate elements through Appium. In this I will guide you to locate elements through UIAutomatorViewer. Locating element is one of the difficult task in mobile automation. We can use UIAutom...

Methods to locate elements through Appium

Locating element is the basic activity to automate any web application or the mobile application. The action can only be performed on the element once we have located the element successfully. If the element is not located then we get NoSuchEleme...

How to swipe in Appium ?

Swipe is one of the basic functionality in any mobile application and in order to automate the mobile application the swipe functionality should be successfully implemented. Appium has a wide range of libraries and a method to swipe the screen...

Different tools used for Mobile testing?

There are several tools available in the market which can aid in testing of a mobile application:- 1. QTP a.k.a. Quick Test Professional. 2. Infostrech automation framework integrated with TestNG , Selenium. 3. Calabash - Functional testing to...

CAN TEST AUTOMATION REPLACE HUMAN TESTERS?

QA experts do not use the word 'test automation'. They rather call it automation checks as they feel testing cannot be automated, but checking can be totally automated. Humans have the ability to do things, observe things, and examine things that...

What is BUILD VERIFICATION TEST?

BUILD VERIFICATION TEST/SMOKE TEST are cursory tests that are helpful to determine the stability and testability of the build. These tests need to be run every time a build is deployed. The Build Verification test is preferable fast verification ...

When to start Automation Testing?

While automating GUI one has to be very careful, do not start the automating when the project starts, else you will ends up re-writing the the automation scripts. Many a times vendors provide training and support of automation tools to the resour...

Choosing the right tool for Testing?

Choosing the right tool is crucial to succeed in test automation. There are several factors that need to be considered when selecting a test automation tool. Some of the tools are free, some are expensive. Here are some factors that you mi...

When, What & not to AUTOMATED?

QA plays a crucial part in product quality and product delivery. In agile development procedure like scrum, QA needs to work in highly flatten verification execution cycles. One of the provocation the QA engineer's face is that the coding that wa...

Programming VoiceXML application

VoiceXML applications include taking orders from customers, making inquiry about any product, package tracking, driving directions, emergency notification, wake-up, flight tracking. VoiceXML is broadly used by call centres for Customer relationsh...

Error obtaining UI hierarchy

Sometimes when we try to capture the screenshot using UI Automator Viewer then the following error is displayed and the screenshot is not captured. Error obtaining UI hierarchy Error while obtaining UI hierarchy XML file: com.android.ddmlib...

A new session could not be created. (Original error: 'java -version' failed. Error: spawn ENOENT)

The first step to use Appium is to configure the system and the most common error that usually comes while configuring Appium is: Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Orig...

Conditional and Looping operations in Selenium Webdriver.

These are the Following methods in Selenium are used in conditional and looping operations:- isEnabled() method is used when you want to verify weather a certain element is enabled or not before executing a command. WebElement txtbox-us...

node is not recognized as an internal or external command in appium

I tried to run the Appium server from the command prompt but I got the error that "node is not recognized as an internal or external command". I executed the following command on the command prompt: node appium Solution: To start the App...

Selenium WebDriver Browser (Navigation) Commands:-

Navigation commands are used to navigate from one web page to another web page that we deal with. Below are some basic Navigation commands which are commonly used while writing the test scripts in Selenium. 1) Navigate To Command - "naviga...
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: