Saturday, November 23, 2019

Selenium4: Working with two parallel windows in Selenium Automation

A new method newWindow() is introduced in Selenium 4 (Alpha). Using this method we can open a new tab or new window from the current window. We can switch between the TABS/WINDOWS and work in parallel.

newWindow(WindowType.TAB) -- Opens a new tab

newWindow(WindowType.WINDOW) -- Opens a new window

In this post we will see working with two windows in parallel.

1. The first window launches the and prints the title
2. Open the new window/tab, switch to it and launch
3. Search for "" in Google
4. Switch back to first window and click on the projects menu on

Friday, November 1, 2019

How do you identify broken links in Selenium Automation?

When we are asked to identify the broken links in the application, what we do? Collecting all the links on the page to a list and looping through links, clicking on links one by one and verify whether the content on the next page displayed or not?

This process is time consuming, and not that effective as it involves multiple to and fro actions. We can identify the broken links without clicking on the each link using Rest-assured (Java API Library). If you wish to know more about rest-assured click this link. Lets jump into coding part.

Monday, October 21, 2019

What is the difference between Implicit Wait and Explicit Wait in Selenium Automation?

This is one of the frequently asked question in interviews. The answer is very simple, in Selenium automation the waits are categorised into types Implicit Wait and Explicit Wait.

Implicit Wait: This wait applicable to all the web elements on the web application through the project once defined. If we define this wait as "15" seconds at driver instantiation level, then driver will wait for 15 seconds for any web element on the web pages.

Explicit Wait: This wait is applicable to one web element at a time based on a condition. Suppose there are two web elements say "button" and "link", button is loading after 20 seconds and link is loading after 30 seconds. So we can define Explicit wait for 20 seconds and 30 seconds using WebDriverWait respectively. And now, WebDriver waits for maximum  20 seconds for "button" and 30 seconds for "link" separately. If the given condition is met within the maximum time, WebDriver moves to the next step, it will not for maximum time period.

Sunday, September 15, 2019

Java Program 6: How to reverse a String in Java?

In this post we will discuss different methods to reverse a String in java programming.

Method 1:

Step 1: Read the input string using "Scanner" class

Thursday, July 18, 2019

Java Program 5: How to reverse given string and each word of it?

Let us understand the problem with an example, suppose "Learn Core Java" is the given string then the expected output should be "nraeL eroC avaJ". We just reverse each word and print the string.

Sunday, July 7, 2019

Soft Assertion Vs Hard Assertion in TestNG

In test automation, when we want to validate the results or some conditions we use Assertion class. If the condition fails, subsequent steps will be aborted and test will be marked as failed. This type of assertion is called Hard Assertion.

Java Program 4: How to find the number of times each duplicate character repeated in the given string?

Let us understand the question with an example, we need to find the all the duplicate characters and how many times each duplicate character repeated.
  • Suppose "Selenium Java" is the given string then, 'e' and 'a' are the duplicate characters and 'e' repeated two times and 'a' also repeated two times.
  • If "Java Program" is the given string then, 'a' and 'r' are the duplicate characters and 'a' repeated thrice and 'r' repeated two times. 

Monday, July 1, 2019

API Testing 06: Introduction REST- assured and creating a REST-assured - Maven project

REST-assured is a java API for testing and validating the RESTful Web services in Java. It is developed and maintained by John Haleby with the help numerous open source contributors.

API Testing 05: Client Server Architecture and HTTP Protocol

Client - Server Model:

In client-server architecture the machine that requests for some data or the machine that consumes the data is called as a Client and the machine the accepts the client's requests and provides the required data as response is called  as a Server.

API Testing 04: Introduction to REST architecture

History of REST:

REST web services were first introduced by Roy Fielding in 2000 at University of California. He submitted a thesis on developing web services using HTTP protocol with some principles.

The web services developed using HTTP protocol and binding to the principles of Roy Fielding are called RESTful web services.

API Testing 03: SOAP vs REST web services

We have two types web services, Simple Object Access protocol (SOAP) and Representational State Transfer (REST) web services.

Both SOAP and REST are meant for the same purpose, but how they work and what they use for communication to happen differentiates them. Lets understand them in detailed.

Friday, June 28, 2019

API Testing 02: What is API testing?

What is API Testing?

Testing the functionality of the APIs, which are developed as part of application development is called API testing.

In API testing an API will be invoked using  a "URL and set of parameters" and result/response will be validated against expected behavior. In an application APIs are tested as part of integration testing at various levels such as Functionality, System Integration, Performance and Security.

Wednesday, May 1, 2019

Katalon 08: Integration of HP ALM with Katalon Studio

In this post, this post we discuss about integration of  HP ALM with Katalon Studio. If we can integrate HP ALM with Katalon we can update the test case results automatically, which reduces lot of manual efforts.

Katalon has in built support for tools like Git, JIRA and etc. It doesn't has it for HP ALM tool. So I have used ALM Service Wrapper to integrate ALM. AutomationTestingUtilities has developed this library for integrating any selenium-java project with HP ALM.

Wednesday, February 20, 2019

How to upload Selenium project to GitHub?

GitHub is a distributed versioning system for the software development teams for managing their working copies.

GitHub is a central repository or Source Code Management, developers use this tool to pull the latest updates to their local machine or to push their latest changes/enhancements to it frequently.

Thursday, February 14, 2019

How to install Jenkins on Windows using windows installer?

In the blog post Jenkins installation using war we have seen installing Jenkins using a war file. In this post we will see installing Jenkins using windows installer on windows machine.

Wednesday, February 13, 2019

How to create Selenium, TestNG project using Maven?

Lets create maven project first.

Step 1: Launch eclipse, then select File --> New --> Maven Project as shown in the below image

Saturday, February 9, 2019

How to switch to new tab in Selenium automation?

You might have seen an application in which clicking on a link opens another web page/application in the new tab, and performing some activity on the application that opened in the new tab.

Friday, February 8, 2019

Create Fake Test Data for Selenium Tests using Java Faker API

Test data is necessary in testing an application, in automation the test data will be either hard-coded or provided from the external sources like Excel, CSV, XML, Database and etc. If its live data that needs to be fetched from sources like Database we have to follow it, there is no other go.

Thursday, January 31, 2019

SonarQube 01: Introduction to SonarQube and Installation

Static Code Analysis:

Static code analysis is a method of analyzing or examining the computer programming code against code and compliance standards without executing the code. The purpose of Static code analysis is to improve the code quality by finding the weaknesses, duplication, bugs and vulnerabilities.

Sunday, January 27, 2019

Java Program 3: Find first duplicate character in the given string

Let us understand the question first, we have to find the character in the given string which is repeated twice and first. Let us understand with examples:

Java Program 2: Verify the given mobile number contains 10 digits and starts with 7, 8 or 9 only

There will be many approaches to solve this problem, we will use regular expressions to solve this in this post.

First we will regular expression that satisfies given conditions, then we will match with the given inputs.

Java Program 1: How to read characters of a String?

String is a character sequence enclosed in double quotes. We can't access its characters one by one like we access the values of an array (a[0], a[1] and etc.) directly.

But we can do it in java in different ways, we will see two approaches in this post.

Saturday, January 26, 2019

Post 2: Attaching Screenshot to failed tests in ExtentReports Version 4

In Post 1 we have learned generating the extent reports using ExtentReportsV4, in this postwe will learn about adding the screenshot to failed test cases. This will be continuation to Post 1, please go through it first then continue this.

Monday, January 21, 2019

Post 1: Generate Results Report In Selenium with ExtentReports Version 4

ExtentReports V4 has been released and it is more beautiful and interactive. In this post we will discuss about generating the reports using Extentreports V4 in Selenium with TestNG.

Friday, January 18, 2019

Why we need to down cast WebDriver reference for JavaScriptExecutor and TakesScreenshot in Selenium?

Let us understand this with below java program example.

I have class A and interface B as shown below, class A is having a method call sayBye(), interface B is having a declared method sayHello().

Now let class A implement interface B, and implement the sayHello() method of interface B in class A as shown below.

DevOps 01: What is DevOps and How it benefits organizations?

DevOps is a culture in an organization, where the development team and operations team help each other by sharing information, process and t...