Use Get Value action

Ask general questions here.
skyphoenix
Posts: 3
Joined: Tue Oct 11, 2016 5:35 pm

Use Get Value action

Post by skyphoenix » Thu Oct 20, 2016 4:18 pm

Hello!
I would like to use the Get Value action in a module.
Well I try to read a property value inner tect from a repo object and save the value in my excel data source.
I tried and the report says that a value has been saved but not to the excel table.
On the other hand I am trying to understand what is meant by the action column "capture" (screenshot).

I previously defined a variable getvalue in my excel sheet and later removed it from the excel table and from the ranorex project.
The variable is no more present in the project but if I try to define a new variable with the name "getvalue" I can't because an error message tells me that the variable is already in use.
Can someone give some info about how to use the Get Value action to save a property value to a variable located in excel?
You do not have the required permissions to view the files attached to this post.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Use Get Value action

Post by krstcs » Thu Oct 20, 2016 5:48 pm

Are you referring to the Ranorex Excel Data Connector when you say "excel data source"?

If so, then you need to understand that the Ranorex Data Connectors (all of them) are designed to be READ-ONLY. You cannot write to a Ranorex Data Connector data source without writing some user-code.

The GetValue() method only stores the value in the supplied local variable, it does not write it back to the data source that is bound to that variable. Generally you use the GetValue() method to either write a value to the test report or put a value in a Global or Test Case Parameter that will then be used in another module later in the test.

If you want to store test result data in your Excel file, you will have to use user-code to open the file and write the data to it using the .NET Office Interop library.
Shortcuts usually aren't...