Flex4 Select Items in s:DropDownList

Class library usage, coding and language questions.
chrisdutz
Posts: 9
Joined: Thu Nov 18, 2010 3:26 pm

Flex4 Select Items in s:DropDownList

Post by chrisdutz » Thu Nov 18, 2010 3:29 pm

Hi,

I am currently trying to select individual items of a spark DropDownList. Unfortunately I couldn't figgure out how to do this yet. A ComboBox is detected as ComboBox from Ranorex, but a DropDownList is a strange combination of "Container" and "Button" ...

What I am trying to do, is to select a language from a language-selector combo-box.

Any help is greatly appreciated.

Chris

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

Re: Flex4 Select Items in s:DropDownList

Post by Support Team » Thu Nov 18, 2010 5:38 pm

Hi,

Please could you post us a Ranorex Snapshot of this combo-box?
One opened and one closed.
And please take a look to following post http://www.ranorex.com/forum/select-a-l ... -t716.html
How to create a Ranorex Snapshot

Thanks in advance.

Regards,
Peter
Ranorex Team
.
Image

chrisdutz
Posts: 9
Joined: Thu Nov 18, 2010 3:26 pm

Re: Flex4 Select Items in s:DropDownList

Post by chrisdutz » Fri Nov 19, 2010 4:25 pm

Well I don't have s problem to select something from a combobox ... I do have a problem selecting something from a DropDownList (Spark). Ranorex does not detect this standard Spark type :-( The solution you referenced to does not apply to my current problem.

I attached the screenshot (As soon as I find out how to do that).
Attachments
DropDownList.rxsnp
(4.85 KiB) Downloaded 304 times

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

Re: Flex4 Select Items in s:DropDownList

Post by Support Team » Tue Nov 23, 2010 2:10 pm

Hi,

getting to the values of this kind of DropDownList has to be done "instant tracking".
So click on the DropDownList to open the popup list holdig your list entries.
move your mouse cursor over one element and press <ctrl> + <left-win> to perform instant tracking.
Now you should see a dataGroup-container holding your list entries as text attributes.
I hope this will help you.

Regards,

Tobias
Support Team
.
Image

chrisdutz
Posts: 9
Joined: Thu Nov 18, 2010 3:26 pm

Re: Flex4 Select Items in s:DropDownList

Post by chrisdutz » Tue Nov 23, 2010 2:26 pm

Even if this shortcut seems to be really handy, unfortunately I don't get any selection item in the Element Browser after pressing the combination. The element which is selected there is parent about 4 levels up from the DropDownList.

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

Re: Flex4 Select Items in s:DropDownList

Post by Support Team » Tue Nov 23, 2010 3:24 pm

Hi,

it's a little tricky to get to the desired result.
To ensure getting one list entry out of the dropDownList you have to do instant tracking not on the whole DropDownList entry but directly on the text you want to track.
So try it again with tracking directly on the text in dropdown.

Regards,
Tobias
Support Team.
.
Image

chrisdutz
Posts: 9
Joined: Thu Nov 18, 2010 3:26 pm

Re: Flex4 Select Items in s:DropDownList

Post by chrisdutz » Tue Nov 23, 2010 5:19 pm

I tried this, unfortunately it doesn't work. See attached snapshot.
Attachments
ComboBox.rxsnp
(127.31 KiB) Downloaded 281 times

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

Re: Flex4 Select Items in s:DropDownList

Post by Support Team » Wed Nov 24, 2010 11:11 am

Hi,

There is no context menu or list available below your Flex Object, if you instant track one item of the drop down list? I think this is an PopUpButton Control ,right? I tried it with our FlexExample page and i get the context menu if I instant track the list item of the the drop down. If I use the "normal" combo box i get a list with list items.

Please could you post us two Snapshots of the whole Flex application? One if the drop down is opened and one when the drop down is closed.

Regards,
Peter
Ranorex Team
.
Image

chrisdutz
Posts: 9
Joined: Thu Nov 18, 2010 3:26 pm

Re: Flex4 Select Items in s:DropDownList

Post by chrisdutz » Wed Nov 24, 2010 12:15 pm

Well I'm using a normal spark DropDownList control, nothing magical. I guess this should work. Don't want to downgrade to an old MX control for this to work.

I attached the two snapshots as well as the code for the skin that is displayed.

PS: Allowing the file extension ".mxml" would be great ;-)
Attachments
MainRanorexSkin.txt
rename this to *.mxml
(5.03 KiB) Downloaded 265 times
opened-popup.rxsnp
(171.76 KiB) Downloaded 289 times
closed-popup.rxsnp
(167.8 KiB) Downloaded 315 times

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

Re: Flex4 Select Items in s:DropDownList

Post by Support Team » Wed Nov 24, 2010 2:37 pm

Hi,

I've tried out to access the text elements holded by the DropDownList by myself and with positioning the cusor on the right place and the use of instant tracking it was no problem to extract the information out of the controll.
So please try again to instant track one element out of the DropDownlist by tracking in center of the text:
screen3.jpg
instant tracking in center of the text
screen3.jpg (60.7 KiB) Viewed 10065 times
and not somewhere in the elements area but outside of the text's area:
screen2.jpg
instant tracking outside of the text area
screen2.jpg (49.22 KiB) Viewed 10065 times
I hope this works for you, cause as I've seen in your code sample you haven'T done anything else as createing a spark DropDownList same as I did and on my example it worked fine.

Kind regards,
Tobias
Support Team
.
Image

chrisdutz
Posts: 9
Joined: Thu Nov 18, 2010 3:26 pm

Re: Flex4 Select Items in s:DropDownList

Post by chrisdutz » Wed Nov 24, 2010 3:03 pm

Well I have tried ... Started the spy, started the app ... used the instant-tracking about 30 Times all over the dropdown (and yes ... also on the text) and all I get selected in the spy is the element:
/dom[@domain='localhos:8082']/body/flexobject/container/container[@automationname='contentGroup']

I know that in my code I am not doing anything out of the ordinary. I guess this issue is related to my other issue dealing with popups in general. On the same page at the bottom right is a logo, which opens a popup using the PopupManager and this too is not detectable.

Could it be possible that it has to do something how the SWF is embedded in the browser as I am not using the Flash Builder generated template?

I have to admit that I'm getting really frustrated as I am working on this (in my oppinion) very simple task for about 2 days now.

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

Re: Flex4 Select Items in s:DropDownList

Post by Support Team » Thu Nov 25, 2010 10:17 am

Hi,

Same issue as in following post
http://www.ranorex.com/forum/it-seems-i ... html#p6789

Regards,
Peter
Ranorex Team
.
Image