ralyn_sg
11 years agoContributor
Creating a random value for a form that has to be automated
Hi.I am new to Test Complete and need to automate a web application.This application requires me to create a new user with a distinct name each time.In order to do this I have to create distinct and random names each time.Is there any way to do this via parameterization or adding variables in keyword tests?Please suggest.
- Ralyn,
To remove the ":" and "/", you can use this instead:
KeywordTests.Test1.Variables.Var1=aqConvert.DateTimeToFormatStr(aqDateTime.Now(), "%m%d%Y %H%M");
Also, this page lists the format specifiers so you can adjust it to suit your needs:
http://support.smartbear.com/viewarticle/59311/