Page 1 of 1

Ranorex 3.1: Flash ComboBox

Posted: Mon Sep 12, 2011 9:10 pm
by ssyrnyk
I am trying to automatically select a combo box list item in my test of a flash swf.
The swf was developed with Flash Professional 5.5.

When I recorded the Mouse action of clicking the list item, the repository item which received the click event was:
list/element/element/listitem[1]/text[@caption='Female']

I would like to have the selected or clicked list item be a variable in my test.

I have tried to do this various ways to no avail.

Can anyone tell me how to do this?

Re: Ranorex 3.1: Flash ComboBox

Posted: Tue Sep 13, 2011 8:13 am
by Support Team
Hi,

therefore please have a look at following chapter of our user guide:
Using Variables within the Repository

Regards,
Tobias
Support Team

Re: Ranorex 3.1: Flash ComboBox

Posted: Tue Sep 13, 2011 2:33 pm
by ssyrnyk
I have, perhaps I am missing something.

I tried changing the path to list/element/element/listitem and then making the listitem object's properties variable.

In the path editor the listitem has 5 properties: Index, index, text, image and selected. The property Index with a capital i can't be set to a variable from the path editor.

Unfortunately I was only able to get the correct behavior by altering that value.

i.e. changing the path of the list item to list/element/element/listitem[2] would cause the mouse to click on the 2nd index in the dropdown list. But list/element/element/listitem[@index='2'] would not.

Re: Ranorex 3.1: Flash ComboBox

Posted: Wed Sep 14, 2011 10:19 am
by Support Team
Hi,

Which version of Ranorex do you have installed?
If you have an older version than 3.1 please update to the new one.
The property Index with a capital i can't be set to a variable from the path editor.
Since the properties are case insensitive there should not be an Index with a capital letter, or there should not be any differences to the index with no capital letter.
Can you send us your project or a Snapshot of the element?
Can you set other attributes to variables, like the text?
i.e. changing the path of the list item to list/element/element/listitem[2] would cause the mouse to click on the 2nd index in the dropdown list. But list/element/element/listitem[@index='2'] would not.
This is because [2] is not the same as @index='2'.
"index" is a "real" attribute which you can set in your code and with "[2]" you select that item that is on the second place in the visualized list.

Regards,
Markus
Ranorex Support Team