TestQA1
3 years agoFrequent Contributor
Creating array with Project variable
Hi,
I have a func that repeats in different Scenarios of feature.
function test() {
If (a> b) {
a = project.variable.temp
}
}
Now I need to have an array variable inside the function that stores the values of 'a' each time the function is called in Scenarios and then finally return itself from the function as a normal array. Something like when scenario1 runs this function, 'a' would be 3, then 2,6,0 in rest of the scenaris and the final array would be finalarray = {3,2,6,0} . So when I need to get its value in another function i can simply call by index.
Any help is appreciated.
Thankyou.
I have a func that repeats in different Scenarios of feature.
function test() {
If (a> b) {
a = project.variable.temp
}
}
Now I need to have an array variable inside the function that stores the values of 'a' each time the function is called in Scenarios and then finally return itself from the function as a normal array. Something like when scenario1 runs this function, 'a' would be 3, then 2,6,0 in rest of the scenaris and the final array would be finalarray = {3,2,6,0} . So when I need to get its value in another function i can simply call by index.
Any help is appreciated.
Thankyou.