Skip to content

Make Selenium Easy

And Keep It That Way

  • Home
  • Share
  • Toggle search form

Selenium Topics – Page 14 – Make Selenium Easy

Posted on 12/30/2019 By admin

In previous post, We have learnt to Establish dependency among test methods. In this post, we will see another concept in Dependency called DependsOnGroup. Consider a scenario: You have created automation scripts for Integration testing. We know that in integration testing, data flows from one module to another. You divide your test methods as per group. … Continue reading TestNG Tutorials 61: Dependency in TestNG – Creating Dependency Among Test Methods – DependsOnGroup

We are going to see another important concept or feature provided by TestNG. This feature is called as Dependency. Suppose, we need to post a status on Facebook. Let’s write a Test Case for it: Step 1: Launch browser. Step 2: Launch Facebook url. Step 3: Create an account on Facebook. Step 4: Post a … Continue reading TestNG Tutorials 60: Dependency in TestNG – Creating Dependency Among Test Methods – DependsOnMethod

A Test method is run for all data set provided by a DataProvider method which is by default one after another. Note here that test method is run on data in same sequence in which DataProvider pass it. The reason behind this is that a DataProvider annotated method has an attribute named “parallel” whose default … Continue reading TestNG Tutorials 59: DataProvider in TestNG – Running DataProvider Method in Parallel – Parallel DataProvider Method

By default a Test method is executed for all data set returned by DataProvider. The reason behind this is that a DataProvider annotated method has an attribute called “indices” whose default value is set to “all”. You may need to run only specific set of data. Like if DataProvider providing you five set of data … Continue reading TestNG Tutorials 58: DataProvider in TestNG – Running Test for Specific Set of Data Provided by DataProvider Method – Dataprovider With Indices

In last post, we have learnt how can we make parameterized DataProvider method in TestNG to provide test data to multiple Test methods from single DataProvider method. Let’s make it more customised. Suppose you need to read data from external file like Excel, properties file etc in a DataProvider method. The name of external file … Continue reading TestNG Tutorials 57: DataProvider in TestNG – Passing External Data File Name to DataProvider Method Using TestNG xml

“DataProvider” is an important feature provided by TestNG to provide required test data to test methods to run on. We have learnt different approaches which we can utilize to get best of DataProvider in previous posts. Let’s learn another way to make more use of DataProvider in TestNG. Suppose we have three Test methods and … Continue reading TestNG Tutorials 56: DataProvider in TestNG – Parameterizing DataProvider Method to Provide Data to Multiple Test Methods

Hello, DataProvider is an important functionality provided by TestNG to achieve Data driven testing or providing a set of different dataset to a method to execute on. We have seen DataProvider concept in details in previous posts. DataProvider may become nightmare if number of data (arguments) is more or it keeps changing or you do not … Continue reading TestNG Tutorials 55: DataProvider in TestNG – Lazy Initialisation of DataProvider Method – Use of Iterator Return Type

Hello Folks, As part of ongoing series on DataProvider, we will learn “How does Encapsulation ( in OOPS concept) help in a DataProvider method? ” in this post. Encapsulation is an Object Oriented Programming concept which describes binding of related stuffs together under one roof. It makes easier to add , remove and modify members. For … Continue reading TestNG Tutorials 54: DataProvider in TestNG – Implementing Object Oriented Concept “Encapsulation” with DataProvider Method

Hello Guys, DataProvider method in TestNG is a way to provide test data to Test annotated methods in a TestNG class. A typical DataProvider method looks like as below:

// A data provider method with return type as 2D array @DataProvider(name = “DataContainer”) public Object[] myDataProvider() { return new Object[][] { { “Mukesh”, “Otwani”, “[email protected]” }, { “Amod”, “Mahajan”, “[email protected]” }, { “Animesh”, “Prashant”, “[email protected]” }, { “Ankur”, “Singh”, “[email protected]” }, { “Amritansh”, “Kumar”, “[email protected]” } }; }

// A data provider method with return type as 2D array @DataProvider(name = “DataContainer”) public Object[] myDataProvider() { { “Mukesh”, “Otwani”, “[email protected]” }, { “Amod”, “Mahajan”, “[email protected]” }, { “Animesh”, “Prashant”, “[email protected]” }, { “Ankur”, “Singh”, “[email protected]” }, { “Amritansh”, “Kumar”, “[email protected]” }

You can see that return type of above DataProvider method is an Object array. Is it mandatory to have return type as Object only? Answer … Continue reading TestNG Tutorials 53: DataProvider in TestNG – Is It Mandatory To Have Return Type as Object in DataProvider Method

Hello Folks, Most of us we know that to handle a dropdown developed using Select tag, we can use inbuilt class of Selenium named “Select” class. This class provides you three methods to select options in dropdown which are below: selectByValue – You need to provide exact value to get it selected.selectByVisibleText – You need … Continue reading Advanced Selenium Concepts – Custom Select Class – Select Value Containing Specific Text in Drop down

Uncategorized

Post navigation

Previous Post: Arguments – Make Selenium Easy
Next Post: Selenium Topics – Page 16 – Make Selenium Easy

Related Posts

December 20, 2017 – Make Selenium Easy Uncategorized
October 2019 – Make Selenium Easy Uncategorized
June 2018 – Make Selenium Easy Uncategorized
How Much Java Required For Selenium? | Make Selenium Easy Uncategorized
Frequently Asked Java Program 24: Java Program to Capitalize First Character of Each Word in a String Sentence | Make Selenium Easy Uncategorized
ScrollInToView1 – Make Selenium Easy Uncategorized

Recent Posts

  • Getting Started with Selenium 4: What Is New and How to Upgrade from Selenium 3
  • Manual Testing
  • Baby Steps To Become Efficient Selenium-Java Automation Tester
  • Features of Selenium 4.0.0 Release – Java Binding
  • Part 1: Handling Drop-down Created Using SELECT Tag In Selenium

Recent Comments

No comments to show.

Archives

  • April 2026
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • April 2024
  • March 2024
  • February 2024
  • December 2023
  • October 2023
  • August 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • May 2022
  • March 2022
  • October 2021
  • April 2021
  • March 2021
  • January 2021
  • December 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • May 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • January 2018

Categories

  • Getting Started
  • Uncategorized

Copyright © 2026 Make Selenium Easy.

Powered by PressBook Masonry Dark