Hi
I was able to create a file which can transfer data to excel file.
I want to create a new excel file for each iteration
Is there any code that can get me current iteration value?
Thanks
Iteration value
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Iteration value
Hello skhanpara,
You could specify a local variable in your recording module(UserCode.cs), update the value of the variable in each iteration of your data-driven test.
Regards,
Robert
You could specify a local variable in your recording module(UserCode.cs), update the value of the variable in each iteration of your data-driven test.
public partial class Recording1 { private int i =1; private void Init() { // Your recording specific initialization code goes here. } public void iteration() { Report.Info("i: " + i); i++; }Another possibility to retrieve the current iteration number is via the internal property "CurrentTestIterationActivity.Index":
int index = Ranorex.Core.Reporting.TestReport.CurrentTestIterationActivity.Index;Please note that this is internal API, we do not recommend to use it and preserve the right to change internal methods and properties at any time.
Regards,
Robert
Re: Iteration value
Thanks
I am calling the variable from the corresponding file but it return back the default value instead of excel data.
I am calling the variable from the corresponding file but it return back the default value instead of excel data.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Iteration value
Hello skhanpara,
I’m afraid that I do not fully understand to which variable you are referring to. May I ask you to rephrase your issue?
Regards,
Robert
I’m afraid that I do not fully understand to which variable you are referring to. May I ask you to rephrase your issue?
Regards,
Robert
Re: Iteration value
i got the solution
thanks for your reply
thanks for your reply