Manually created variable automatically get assigned

Ranorex Spy, Recorder, and Studio.
varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Manually created variable automatically get assigned

Post by varun » Mon Jan 07, 2013 1:18 pm

Hi Support,

In a module, multiple drop-down fields are there with values Yes & No. While recording Test Case, I selected "No" in each such drop-down. But while creating variable for drop-down, it was observed that Variable created for getting input of first drop-down is assigned automatically to all other steps of drop-down.

Is this a bug or a part of functionality? Please clear and also let me know, How I can create different variables for all such drop-downs? Please find attached screenshot FYI.

Thanks in advance,
Varun.
Attachments
DropdownVariable_0107.png
DropdownVariable
DropdownVariable_0107.png (40.12 KiB) Viewed 996 times

varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Re: Manually created variable automatically get assigned

Post by varun » Tue Jan 08, 2013 11:45 am

Hi Support,

Desperately waiting for your feedback on this post.

Thanks,
Varun.

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

Re: Manually created variable automatically get assigned

Post by Support Team » Tue Jan 08, 2013 1:54 pm

Hi Varun,

Could you send us a Ranorex snapshot file of the different ListItmes, this will help us to analyze the issue faster.
Thanks in advance!

Regards,
Markus
.
Image

varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Re: Manually created variable automatically get assigned

Post by varun » Wed Jan 09, 2013 5:09 am

Hi Markus,

I have attached RX snapshot for some of drop-downs, Please find them in attachments.

Thanks,
Varun.
Attachments
ThirdDropdown.rxsnp
3rd
(207.66 KiB) Downloaded 199 times
SecondDropdown.rxsnp
2nd
(207.69 KiB) Downloaded 193 times
FirstDropdown.rxsnp
1st
(207.69 KiB) Downloaded 181 times

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

Re: Manually created variable automatically get assigned

Post by Support Team » Wed Jan 09, 2013 3:43 pm

Hello Varun,

Thank you for the snapshot files!
Can you please explain where you set the values of the variable? If you do not change the value of the variable within the recording there will be no change in the RxPath.
Could you please explain in more detail what do you want to achieve?
Thank you!

Regards,
Bernhard
.
Image

varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Re: Manually created variable automatically get assigned

Post by varun » Thu Jan 10, 2013 5:57 am

Hello Bernhard,

I recorded a scenario and while recording selected "No" in all drop-downs. To make the Test case data driven, I created variable(from RX Path Editor) for the first drop-down say as "VarOne". Moving to step of second drop-down, it was observed in repository that "VarOne" is assigned automatically to it. And If I forcibly create it's variable then change is also reflecting to first drop-down. Means all drop-down in which "No" is selected while recording will by default use this variable, i.e. VarOne.
You can for instance checkout in previous screenshot "DropdownVariable_0107.png" that for Steps 2,4,6 (selected in screenshot), only one repo variable is appearing highlighted and that is "$VarToTest".

What I want is to create variable for each input independent of values I select while recording.
Hope I made you clear my point.

Your Feedback awaited.

Thanks,
Varun.

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

Re: Manually created variable automatically get assigned

Post by Support Team » Thu Jan 10, 2013 2:19 pm

Hello,

Unfortunately, I am not able to reproduce this issue on my machine.
My guess is that you use the wrong elements in order to select your option tags.

If you want to automate the selection of option tags in a select tag you have to keep the following in mind: Just track the select tag if it is not expanded and then manually expand the tree in Spy in order to get the RxPaths to its child elements (option tags).
Now you could add them (option tags) to your repository and in order to select one of them you could add a SetValue action, use the select tag as appropriate repository item for this action and set the specific attribute (TagValue) to the new value or you could also set the "Selected" property of the appropriate option tag in code to true as shown in this post.

If you would record the click on the option tag, Ranorex would track the inappropriate browser specific created representation of the options tags which are "outside" of the current webpage (in FF they are shown in an external container and in IE they are shown as MSAA ListItmes).

If you keep this in mind you should have no problems with automating such elements.

Regards,
Markus
.
Image

varun
Posts: 110
Joined: Mon Jul 23, 2012 5:52 am

Re: Manually created variable automatically get assigned

Post by varun » Mon Jan 14, 2013 2:03 pm

Hi Markus,

I have done it manually, as you suggested.
But please try to work on it again, so that it can be tracked if it is a Bug. 8)

Thanks & Regards,
Varun.

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

Re: Manually created variable automatically get assigned

Post by Support Team » Tue Jan 15, 2013 2:00 pm

Hi Varun,

I reinvestigated the issue and this is a drop down related problem, since the option tags are shown in a container as listitems and since the RxPath to the container is always the same "/container[@caption='selectbox']". This is also the reason why there is just one repository item, since "all" tracked elements, in your test, have the same RxPath.
This is not a bug on our site it is because of the MSAA representation of such option tags.
In order to automate such drop downs you have to follow the points I described in my previous post.

Regards,
Markus
.
Image