Jump to content
WAPT Forum
Sign in to follow this  
Guest adoddi@123

Dynamic File Name

Recommended Posts

Guest adoddi@123

I have a scenario where i need to pass the values to the request parameters through a file ( i can use CSV or Ordered list) which i am generating dynamically through java script. The problem is that i need to use a different CSV file name (whose content is also different) for each user since the file content is not same for all the users. I am not sure on how to address this issue. Can somebody please help?

Share this post


Link to post
Share on other sites
Guest adoddi@123

I might have not articulated the problem correctly!!

I am creating the data and writing it to a file through java script operator (creating a unique file for each user).

But the issue is I am not sure how to read this file using CSV or Order list funtion becuase i can not use a variable in the filename;

 

I am using the below function for reading the value from file.

 

$CSV(0,0,Loop_1,C:\Users\Documents\My WAPT Pro\Scenario Files\CSV Files\TestFile.csv)

 

I want to use a variable instead of "Test.csv" since the file name is different for each user.

Any ideas on how to do this?

Share this post


Link to post
Share on other sites

Unfortunately you cannot use dynamic file name in CSV function. So you need to use JavaScript operator to read and parse CSV file with dynamic name.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×