I want to save ppt with random name or string
npaisley I want save ppt file with random name . I have tried using data generator but its always taking the same value as mentioned in screenshot
So when I am running my test step 2nd type I am getting popup file alredy exist with same name
How to set variable for random string values
I am calling variable like this
You can create a string variable with date/hours/minutes/seconds right before you are saving the file
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqdatetime/methods.html
Hi Jainsoumya!
The data generator can create unique values, but only once. We are not able to get unique data from the data generator at runtime.
I agree with Marsha_R, one solution would be to use the the aqDateTime object to populate a variable with the current time and use this as your filename.
In the test below I have created a Persistent Project Variable in the String type. In our test, we fill this var out with a Set Variable step to populate the variable with the current time, with the second Set Variable step we are formatting the string to fit the Windows file naming conventions. Afterwards we are passing this variable into the save dialog.
Note that I am using the 'Code Expression' mode for the values on these steps.
I hope this helps!