Page 1 of 1

Module variables always takes default value

Posted: Fri Aug 03, 2012 2:16 pm
by Kumar
Hi,

I am a beginner with Ranorex. I have been trying to do a simple script which perform the below operation:

- One common function for log-in with 3 module variables (URL, UserName & Password)
- Call this function from a Test Case (From User Code)

Script works fine with the default values. I tired to read the three parameter from Excel (Followed steps in the Lesson 7 (http://www.ranorex.com/support/user-gui ... html#c3110).

Every time the module variables takes the default values and the script fails. I have provided the screenshots in the attachment.
This is below code is one which is inserted by Ranorex. Is there anything to be updated here?

Code: Select all

 string _URL; //= "Application Url";
        [TestVariable("64F4E838-F997-4B8F-9DEA-777A48E17A28")]
        public string URL
        {
        	get { return _URL; }
        	set { _URL = value;
        	URL = _URL; }
        }
[img]

[/img]

Not sure where i am going wrong, it would be very helpful if anyone can help me on this.

Thanks & Regards,
Kumar

Re: Module variables always takes default value

Posted: Mon Aug 06, 2012 1:35 pm
by Support Team
Hi,

Thanks for the screenshots!
It seems that there is a failure in the recording so Ranorex didn't execute the UserCode module where the bound variables are saved.
Which failure was thrown in the recording?

Regards,
Markus
Ranorex Support Team

Re: Module variables always takes default value

Posted: Mon Aug 13, 2012 6:09 am
by Kumar
Hi Markus,

Apologies for the delay in responding.

There were no errors in recording. The scripts works fine if i had set the default values.

Hope i have clarified your query!

Thanks & Regards,
Kumar

Re: Module variables always takes default value

Posted: Mon Aug 13, 2012 2:32 pm
by Support Team
Hi Kumar,

Could you please send us the rxlog file of the test which went wrong or even better the whole solution?
If you like you can also send it to our support mail address: [email protected].

Regards,
Markus
Ranorex Support Team