Module variables always takes default value

Ranorex Spy, Recorder, and Studio.
Kumar
Posts: 24
Joined: Fri Aug 03, 2012 12:12 pm

Module variables always takes default value

Post by Kumar » Fri Aug 03, 2012 2:16 pm

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
Attachments
Binding Module variables.zip
(499.44 KiB) Downloaded 201 times

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

Re: Module variables always takes default value

Post by Support Team » Mon Aug 06, 2012 1:35 pm

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

Kumar
Posts: 24
Joined: Fri Aug 03, 2012 12:12 pm

Re: Module variables always takes default value

Post by Kumar » Mon Aug 13, 2012 6:09 am

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

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

Re: Module variables always takes default value

Post by Support Team » Mon Aug 13, 2012 2:32 pm

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