This is related to data driven test.
After added an excel data. I would like to cycle through the columns in the data table and extract the column name.
How do I do this?
Thanks!
How to access the column names of the test data files
Re: How to access the column names of the test data files
Try this:
Code: Select all
Ranorex.Core.Testing.ITestCase itc = Ranorex.Core.Testing.TestCase.Current;
Ranorex.Core.Data.ColumnCollection columnc = itc.DataContext.Parent.CurrentRow.Owner.Columns;
foreach(Ranorex.Core.Data.Column col in columnc){
Report.Info(col.Index + " " + col.Name);
}