How can i increament the variable name Result1,Result2,Reslt3 in looping?
Check as below
You can increase the condition instead of 2 you can increase it at your requirement
Hope this may help you
Thanks
But i want to Result1 variable because of i verify the test case by using the Result1,Result2 variables.In this method the test cases are failed
You can save that in a variable also and increment the counter
So if this not satisfies let me know by providing a sample example
Thanks
Hi,
If i create a Result as a String Concatenate with Counter, the outpt was 1,2,3 Like this. Can u plz give me a sample example?
Thanks.
You can create a Variable as Result = “Result”
Later you can use Result + Counter.ToString
This may help you
Thanks
The Output was Result1 but the test cases failure
In the Resut1, Result2 variable store the values are "Output
But the concatenate Result1,Result2 values are not equal. This is my prblm sir
Instead of Message Box, replace that with Assign activity and write as below
Op = Result + Counter.ToString
Hope this may help you
Thanks
Dynamic variable names should be avoided. It makes your code unpredictable, and there are a lot of data structures that support dynamic allocations better.
Try using a list (or array if you have a fixed number of entries) object instead.
That way you can target your values like this: Writeline: Result(Counter)
Covered in this lesson:
Sir, I want to verify the test case from get text value and Result1 value are equal.
Example,
Get text Value (“Output”) store in variable name Test
Result1 Value(“Ouptut”)
Result2 Value(“Output”)
Result :
Test=Result1
Test=Result2
I want the values are equal.
Pseudo code:
Results[] = new String(){"result value 1", "result value 2", "result value 3"}
Test = GetText 'output'
For each resultValue in Results {
validate test = resultValue
}
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.