How can we create data driven framework using TestNG?

0 votes
6 days ago in Selenium by Yuvraj
14 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey Yuvraj, we can create a Data Driven Framework by using @DataProvider annotation in TestNG.

@DataProvider(name="getData")
 public Object[][] getData(){
  //Object [][] data = new Object [rowCount][colCount];
  Object [][] data = new Object [2][2];
  
  data [0][0] = "FirstId";
  data [0][1] = "FirstPswd";
  
  data[1][0] = "SecondId";
  data[1][1] = "SecondPswd";
  
  return data;
  
 }
answered 5 days ago by Anvi
• 7,160 points

Related Questions In Selenium

0 votes
1 answer

How can we take screenshots of tests in Selenium 2 using C#

We can take screenshots using below function ...READ MORE

answered Mar 23, 2018 in Selenium by nsv999
• 5,050 points
115 views
+2 votes
1 answer

How can we handle authentication popup in Selenium WebDriver using Java

The Alert Method, authenticateUsing() lets us skip ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,590 points
3,647 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,050 points
135 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
526 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
129 views
0 votes
1 answer

How can I create a POM test case in Selenium Webdriver?

Hey Akshay, follow these steps to create ...READ MORE

answered May 12 in Selenium by Anvi
• 7,160 points
22 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.