Question about datadrivenframework - module 16 - for C# | Selenium C# Forum
M
mai Posted on 21/07/2019

Hi 

I Was going through the data driven framework (module 16) ... so in part 11/12  does deleteLead() test case.

Not sure why we can't reuse this getData() function in the example below? 

public static object[] getData()
{
return DataUtil.getTestData(xls, testCaseName);
}

 

 

Why did we create a new "getDeleteData()" function ?

 

public static object[] getDeleteData()
{
return DataUtil.getTestData(xls, "DeleteLeadTest");
}

 

 

 


G
gunjan Replied on 24/07/2019

We have used separate getDeleteData() function just in case if you wanted to delete any selected data and not all the data we have in the excel.


M
mai Replied on 25/07/2019

Hi Gunjan

 

still don't really understand.. because delete also has delete section in excel file ...

 

so you have under data tab in excel file

"createtestlead"

"deletetestLead" 

sections ..

so I was expecting you to use the same getdata function to create then delete test lead.

Not major question but just wanted to know if I was missing somehting in the logic ?