This is a migrated thread and some comments may be shown as answers.

Unique names for files

1 Answer 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Maxwell
Top achievements
Rank 1
Maxwell asked on 14 Feb 2017, 07:40 PM

Part of one of the scenarios that I'm putting together requires me to create a unique name for a file.  Ideally, it would be test_workflow1, test_workflow2, etc. with the number on the end ascending.  My question is:  Is it possible to put in a coded step something that could possibly know to increment the name of the file? and if it is possible how would I go about doing so?  Also, would it be better to simply add a random number to the end of the file name?

 

Thanks

M

 

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 17 Feb 2017, 10:01 AM
Hello Maxwell,

Here you could find how to generate random text and random number in code. Once you generate the value you need for your file name you could store it into a variable. Then use the extracted variable to data bind the download path of the Dialog step. 

i hope the above information will be useful to you! 

Regards,
Elena Tsvetkova
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Maxwell
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or