title: Return Array from dataprovider to @Test method
body: <p>I have created a Selenium  framework with TestNG. In this @Dataprovider contain set of code that reads data from excel and return this value in arrayform to @test.</p>
  
  <pre><code>@Test(dataProvider="createData1")
  private  void login (String data, String data1) throws IOException{}
  
  @DataProvider
  public static String [][] createData1() throws IOException{
  
       String Scenarioname=new Object(){}.getClass().getEnclosingClass().getSimpleName();
       return  xls.readvalues(Scenarioname,"testdata");
  
  }
  </code></pre>
  
  <p>Since login Test case has two inputs so method Login has two attributes.
  Likewise if register Test case has 5 input then register method will have 5 attributes.
  But  I want to create a standard way  in a manner so that when I return array from @dataprovider. Then @test method should read value dynamically rather than I mentioned number of attributes for each method.</p>