Flex 4 spark ComboBox getting classified as an element : Object Identification and Technologies

Flex 4 spark ComboBox getting classified as an element

Technology specific object identification, supported applications, web technologies, and 3rd party controls.

Flex 4 spark ComboBox getting classified as an element

Postby jhorton » Wed Aug 25, 2010 9:36 pm

I'm trying to write some code to be able to select one of the index's from a spark.componets::ComboBox componet in a flex 4 application. I have the automation libraries compiled into the flex 4 app. When I use Element Browser to spy the object it gets identified as Element which I assume means it doesn't know what it is. I have tried to cast the object to a comboBox by doing this.

Ranorex.ComboBox comboBox = (Ranorex.ComboBox)WMCRepository.Instance.WMC.TopBar.ElementAvailableModules;


But when I try to compile it I get the error : Cannot convert type 'Ranorex.Unknown' to 'Ranorex.ComboBox' (CS0030)

I'm using Ranorex 2.3.4 and I saw in the 2.3.3 release notes that support for the spark family of components were supported. What am I doing wrong?

SparkComboBox.rxsnp
spark combo box snapshot.
(3.47 KiB) Downloaded 32 times
jhorton
 
Posts: 6
Joined: Tue Aug 17, 2010 11:11 pm

Re: Flex 4 spark ComboBox getting classified as an element

Postby sdaly » Thu Aug 26, 2010 9:12 am

If you haven't already, then try the following...

If you have managed to track the combobox in Spy then simply drag the element into your code. Then do whateveritscalled.Click

Then, hover over a list item in the combobox and hold down ctrl+windowsButton to track the item. Drag that tracked item into your code and do whateveritscalled.Click.
User avatar
sdaly
 
Posts: 194
Joined: Mon May 10, 2010 12:04 pm
Location: Dundee, Scotland

Re: Flex 4 spark ComboBox getting classified as an element

Postby Support Team » Thu Aug 26, 2010 10:57 am

Jeremy,

It looks like the spark combobox has not been correctly mapped as a combobox (by us).

To select an item, you have to open the drop down and select an item there
(the dropdown is a container with a path like flexobject/container[@id="dropDown"]).
This can get a bit nasty, however, if you need to scroll, because items are usually not available until scrolled.

Another possibility is to try and select the item directly:
Code: Select all
yourComboBox["selectedItem"] = "<string>"+itemText+"</string>";
yourComboBox["selectedIndex"] = "<number>"+index+"</number>";


"selecteditem" might not work with more complex data items.

Michael
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4297
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Flex 4 spark ComboBox getting classified as an element

Postby jhorton » Thu Aug 26, 2010 4:24 pm

Thanks for the help. If I open the drop down first I can then click on one of the objects inside as you described. Hopefully this will be something that we can get fixed in the next release(3.0) ;)
jhorton
 
Posts: 6
Joined: Tue Aug 17, 2010 11:11 pm

Re: Flex 4 spark ComboBox getting classified as an element

Postby jhorton » Tue Aug 31, 2010 10:44 pm

It seems like the spark family in general doesn’t get identified very well. The spark TabBar object isn’t getting recognized as a TabBar/TabPage either. Do you happen to know if that is something that might be fixed in 3.0 timeframe?
jhorton
 
Posts: 6
Joined: Tue Aug 17, 2010 11:11 pm

Re: Flex 4 spark ComboBox getting classified as an element

Postby Support Team » Wed Sep 01, 2010 1:36 pm

Hi,

There are some controls, not often, which have the wrong role. In your case it seems that the TabBar/TabPage has no role and therefore Ranorex recognize the item as element, but there shouldn't be a problem to automate this element. All information should be available, the element is just not displayed as a TabPage. I will add an issue to our internal bug tracking tool regarding to the problem.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4297
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Object Identification and Technologies

Who is online

Users browsing this forum: No registered users and 0 guests