Page 1 of 1

Accessing global variables

Posted: Mon Sep 21, 2015 11:37 am
by Nalinikanth
1. In the suite, we have created a global parameter username

2. In a test case, we have inserted a usercode to read the value from the excel sheet (not excel connector, adodb connection)

we need to assign the value of username(global parameter) in the usercode that is read from the excel sheet

we are able to read the value but while assigning it to the global parameter

TestSuite.Current.Parameters["username"] = TD.Rows[0]["sUname"].ToString();

an error is thrown

Please let us know a way to read the data from excel and assign to global variable and use this variable in the recorded steps or usercode

Re: Accessing global variables

Posted: Tue Sep 22, 2015 12:02 pm
by Support Team
Hi Nalinikanth,

Basically, it is possible to assign a value to the global parameter as you did.

May I ask you which error message is shown? This would help us analyzing the issue in more detail.
Please also let me know if it is possible for you to provide us your Ranorex Solution and which version of Ranorex you are currently using.

Thank you.

Regards,
Markus (S)