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 https://www.selenium.dev and prints the title
2. Open the new window/tab, switch to it and launch http://www.google.com
3. Search for "qababu.com" in Google
4. Switch back to first window and click on the projects menu on

Above one is our test scenario, checkout the below video


Thanks for reading and watching. #HappyLearning #HappyTesting #qababu

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 categorized 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 ondition. 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 and 30 seconds using WebDriverWait and we can make the WebDriver to wait for these two elements individually.


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.

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...