Answered

How to save data in Subject7 variables.

I have a test which collects data from a web site and stores it into variables.   The test goes through several hundred pages and collects a few pieces of data from each page.  

I would like to save that data, ultimately into a file.   Is there a way to do this in subject7?   I have no problems extracting the information from the web page, but am not sure how to move it from the variable to a format where I can save it.

 

 

0
2 comments
Avatar
Firas Khalili

Hello William,

In your test case add a step with Set_List command and select Empty as Source Type. This will create an empty list that you can fill at any time in your test. After Get_Web_Value step(s) you would add a step with Modify_List command to add a new value from the variable in your Get_Web_Value step. In the end, you can print the outcome into a file or you can view the list by clicking the three dots in the Variables section.

1. Set_List command with Source Type Empty
2. Loop command
3. Modify_List command with Add_Row
4. Get_Web_Value command 
5. Modify_List command with Modify_Value that uses loop to identify the row to add the value in from the variable 
6. Loop_End
7. Print command with Source Type - List with Target - File


Here are some links to guide you with the commands

https://subject7.atlassian.net/wiki/spaces/SD/pages/879493553/SET+LIST+Command
https://subject7.atlassian.net/wiki/spaces/SD/pages/1435303937/MODIFY+LIST+Command
https://subject7.atlassian.net/wiki/spaces/SD/pages/875724809/PRINT+Command

Please let us know if you need anything else

Thanks,
Subject7 Team

0
Comment actions Permalink
Avatar
William Smith

Thank you for this.  I think this will work for us.  I appreciate your time.

0
Comment actions Permalink

Please sign in to leave a comment.