Forum Discussion
Hi,
OK... If I got the problem right...
The value of the Code variable in the UniqueCode() function is expected to be 'A301 / General sheet 1'. It was obtained as a result of splitting of the Confirmation message by ':' character.
Then the value of the Code variable is stored to the 'wsuniquecode' string project variable.
I expect that all the above works as expected.
Now, in the WorkSheetSample() function, the value of the 'wsuniquecode' string project variable is obtained and you try to split it again by ':' character. As there is no ':' character in the value of the 'wsuniquecode' string project variable, the result of the Split() function is an array with one element (and index of 0) and this array is assigned to the Code variable.
In the next line, you are trying to get the second (non-existing) element of the array (Code(1) - numbering is from zero).
This element does not exist and thus nothing is stored to the project variable.
Does my explanation help?
Hi Alex,
Hope you understand my issue, now forget about my code and please provide me a solution that where can I store the value in a string variable(i.e., value in 'wsuniquecode') so that I want to use it later in my keyword test.
Regards,
R. Visalini.
- AlexKaras8 years agoCommunity Hero
Hi,
> I couldn't get you. Could you provide clear solution how can I do it.
Approach and the code you attached previously should work.
I'm doubting that I can provide you with something better until you let us know what exactly does not work for you.
- AlexKaras8 years agoCommunity Hero
Within test run it is perfectly fine to use (table) temporary variables to pass data between tests.
- visalinir8 years agoContributor
Hi Alex,
I couldn't get you. Could you provide clear solution how can I do it.