TestNG Tutorials 67 : Sharing Data Among Test Methods in TestNG Using ITestContext

As a part of TestNG Tutorials, in this post we will see “How to share data or state among test methods in TestNG using ITestContext interface?”. In previous post, We have learnt sharing data among test methods using static variables. But this is not optimal. I see below problem in using static variable approach:- You … Continue reading TestNG Tutorials 67 : Sharing Data Among Test Methods in TestNG Using ITestContext

REST Assured Tutorial 15 – Multiple Ways of Calling HTTP Methods on a RequestSpecification

As a part of End to End REST Assured Tutorial , in this post We will learn about calling HTTP methods ( get, post, put etc) on a RequestSpecification. We have already seen what is Request Specification in Rest Assured. The major confusing and interesting thing about Rest Assured is that you have multiple ways … Continue reading REST Assured Tutorial 15 – Multiple Ways of Calling HTTP Methods on a RequestSpecification

Java Interview Question 4 – What is HashCode of an Empty String?

As a part of Java Interview Questions, in this post, we will see an interview question which I faced in an interview, “What is HashCode of an Empty String?“. HashCode is an integer representation which is typically generated by converting the internal address of an object to integer. Object class contains a native method called … Continue reading Java Interview Question 4 – What is HashCode of an Empty String?

Java Interview Question 3 – Can We Overload main Method in Java?

As a part of Java Interview Questions, in this post, we will see a frequently asked interview question "Can we overload main method in Java?". When we keep more than one methods in a class with same method name but at least with one difference in its method signature (Number of arguments , Order of … Continue reading Java Interview Question 3 – Can We Overload main Method in Java?

Selenium 4 Features – Retrieving Browser Console Log Using Selenium WebDriver

Selenium 4 is out ( Alpha version at the time of writing this post). They have given a very important feature in Selenium 4 which is Logging. Logging is generally helpful to know what went wrong. When you launch a website in browser, you can see logs in console tab of Developer tool. These logs … Continue reading Selenium 4 Features – Retrieving Browser Console Log Using Selenium WebDriver

Selenium Interview Question 10 – Difference Between findElement() and findElements() methods

As a part of Selenium Interview Questions series, in this post, we will learn differences between findElement() and findElements() methods in Selenium WebDriver. WebDriver interface provides two methods to locate web element/s. Those are:- findElement(By by)findElements(By by) Difference between findElement() and findElements() are below:- findElement() is used to find first web element on current page … Continue reading Selenium Interview Question 10 – Difference Between findElement() and findElements() methods

REST Assured Tutorial 14 –Interface RequestSpecification – How the request will look like

As a part of End to End REST Assured Tutorial , in this post We will learn about an important interface named "RequestSpecification" in Rest Assured. RequestSpecification is an Interface whose implemented class is RequestSpecificationImpl. This interface helps you to create request or how the request will look like. For example:- What will be the … Continue reading REST Assured Tutorial 14 –Interface RequestSpecification – How the request will look like