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.

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