Accessing global variables

Ranorex Spy, Recorder, and Studio.
Nalinikanth
Posts: 2
Joined: Mon Sep 21, 2015 11:25 am

Accessing global variables

Post by Nalinikanth » Mon Sep 21, 2015 11:37 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Accessing global variables

Post by Support Team » Tue Sep 22, 2015 12:02 pm

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)
.
Image