How to get the current count of Data-Driven Loop by using script?
I have a Data-Driven Loop and the data variable is a .csv file.
Is there any way to know the current count number of the running Data-Driven Loop? The simplest way could be adding the numbers in .csv file but I'm trying to not doing that.
Is it possible to get the count number by using script?
Solved! Go to Solution.
I am not sure that data-driven loop provides a loop counter, so either add a column to the datafile as you already suggested or implement a counter variable in your test code. (Exact implementation may depend on how data-driven loop is implemented in your case.)
/Alex [Community Champion]
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.