Returning values from one project to another
Posted: Tue Aug 07, 2018 10:25 am
What I'm currently trying to achieve is to write a separate project containing the code that will be posting data via HTTP using WebRequests. The idea is to have this as a generalised project that can be dropped into other Ranorex solutions and used whenever it's needed since some of our testers have no real development knowledge. The problem that I'm having is figuring out how to get functions (UserCodeMethods?) in the posting project to return values to recordings in the other project that references it.
How would I go about this? (am currently using Ranorex 8.2).
I'm also trying to return a value from a UserCodeMethod within a UserCodeLibrary to a recording with both the recording and the code located within the same project. I've seen elsewhere that I can apparently add a variable to the recording then set that within the code. Is that correct or does that only apply to modules? I've tried and all I get is the generic 'The name 'returnCode' does not exist in the current context (CS0103)' message when I try and use it within a method (returnCode obviously being the variable I'm trying to use and the code is trying to set)
How would I go about this? (am currently using Ranorex 8.2).
I'm also trying to return a value from a UserCodeMethod within a UserCodeLibrary to a recording with both the recording and the code located within the same project. I've seen elsewhere that I can apparently add a variable to the recording then set that within the code. Is that correct or does that only apply to modules? I've tried and all I get is the generic 'The name 'returnCode' does not exist in the current context (CS0103)' message when I try and use it within a method (returnCode obviously being the variable I'm trying to use and the code is trying to set)