Forum Discussion

Jainsoumya's avatar
Jainsoumya
Contributor
3 years ago

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 ge...
  • npaisley's avatar
    3 years ago

    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!