Forum Discussion
Your code expression is incorrect. What I would suggest is give it a starting static piece of text to identify it as coming from your automation and then the datetime stamp to make it unique. It SHOULD be something like this.
'Automation' + aqConvert.DateTimeToFormatStr(aqDateTime.Now(), '%Y%m%d%H%M')
Now, what I would ACTUALLY, do is use the Set Variable Value operation in your keyword test, create a variable call "projectname", and assign it the value of the code expression as I indicate above. Then, in that operation in your screenshot, set the "Mode" to "Variable" and select that projectname variable from the drop down. You can then use that variable throughout the keyword test anytime you need to reference the project name.
Hi Robert, thanks a lot for your reply.
While your solution recipe makes perfect sense I find myself having troubles applying your clues so I hope you won't mind me asking you to please elaborate further even though it probably is very back to basis.
Screendump 1 is a clip from my test where the project's name value is entered and it's this value I'd like to change from test re-run to re-run - however, this project name is going to be inserted later in the same test (Screendump 2).
Then, I've created my variable, ProjectName, immediately after entering the project name value at the very beginning of my test (Screendump 3 and 4), and I'm assigning the variable the value of your code expression (Screendump 5).
However: Should the ProjectName variable value be defined by the entire code expression? The "Automation" part too?
I reckon that the ProjectName variable should be created and its value assigned at this initial point in the test as the ProjectName variable needs to be inserted further down in the test?
To me it doesn't appear logical to set the variable value at the end of the entire recorded test.
Thank you very much in advance.