Datasources: How to use DataSource to get password linked to logged in user

In this article, we will explain how to combine the username from your session and a password from a Datasource.
 

Required documents

.xls document with username and password uploaded (imported) to the datasource

Actions from the Toolbox implemented

 

 

Set up a Variable for the logged-in username

  • Click on

    it to open the Variables wizard.
  • Select Adjust the value of a variable and click on Next.
  • Click on Add a new variable to add a new variable.
  • Add a name to the variable, select Text, and click on OK.
  • Select your created variable and click on Next.
  • Click on Add an item... and select User name.
  • You will now see the User name in your item list.
  • Select Next.
  • Complete the wizard by clicking on Finish.
  • You will have successfully added a variable to your script.

Set up the Datasource to return the password linked to the Username

  • In the Toolbox, select 

     
  • A new window will open: Select a Datasource.
  • Select the datasource that you want to use and click OK.

Datasources: import the Datasheet in LoadGen Studio

To import an .xls document, read the following article.

  • The Filter Editor will open with the data viewable in the result view.
  • In Specify your filter here, change SomeValue (by clicking on it).
  • From the dropdown, select the variable you've created.
  • You will need to enter the expected value here. The best practice is to type the first username. 
  • Click OK when completed.
  • Drag the Password from the right bottom box to specify the result. You should get the following situation (see image below).
  • Click OK, and you will have completed your setup.
  • If you run the block, you will get the password of the logged-in user.
Was this article helpful?
0 out of 0 found this helpful