Page 1 of 1

Setting global parameter

Posted: Thu Dec 14, 2017 4:40 pm
by Ranolaf
Steps to reproduce:
- create global paramater in Testsuite-Context
- place a smartFolder under Testsuite
- create a Testcase in smartFolder above
- create setup-region in Testcase above
- create a own CodeModule in Setup-region
- reading global Parameter with Testsuite.Current.Parameters["parameter_xy"] works fine
- setting global Parameter with same Codeline in same CodeModule will be lead to an exception "unknown key"

In other cases setting the global Parameter works fine (e.g global Parameter of a smartFolder). Only this case is differnt. Any ideas?

Re: Setting global parameter

Posted: Fri Dec 15, 2017 4:30 pm
by Support Team
Hi Ranolaf,

Thank you for reporting this issue.

Unfortunately, I was not able to reproduce this behavior in the current version of Ranorex (8.0) using the following structure
gpIssue.jpg
and using the following code
Report.Info("Value", TestSuite.Current.Parameters["Global"].ToString());
TestSuite.Current.Parameters["Global"]="New Value";
Report.Info("Value", TestSuite.Current.Parameters["Global"].ToString());
gpIssueReport.jpg
May I ask you which version of Ranorex you are currently using? If possible, please also attach a short sample project that allows us to reproduce the issue locally.

Thank you in advance.

Best,
Markus (S)