How to use a variable to fetch the data from data set.
Here is a scenario: From my test I will call a function by passing an argument. Then inside the function it has to read the value from the data set based on the argument. But I am unable to use the parameter variable while injecting from a data set in a print statement, because within Template injector we have select the field from the combo box.
For example, inside the test I am passing a value as "instructorUser", and the value for this field is available in the data set. So how can I get this value based on my argument.
FYI- My test path is : Home -> forteAutomation -> web -> validation -> forteValidation -> nasir_test
Could you provide any solution for this?
Hi Joseph,
In my scenario, we have different category of users and accordingly there are different users. So each test will use different category of user so to my login function i will pass the category of user and accordingly the function will pull the appropriate user from the data set.
Please let me know if my explanation makes sense.
--Niranjan.
Hi Niranjan,
So the scenario is to log in and out of an application in the same test case using datasets from the same templates or from different templates?
If you can provide a screenshot of a test case that can demonstrate it, that would be great.
Regards,
Subject7 Team
Hi Jeseph,
Scenario is to login to the application using same template with different field and the field value should be a variable not the static value which can be selected from the combobox. In my case i am using a parameterised function.
I am providing you couple of screenshots for your referrence.
In the following screenshot, i want something like ${automationUsers.userCategory}. Here userCategory is the variable in the function.
Thanks,
Niranjan.
Please sign in to leave a comment.