ReadOnlyListWrapper

Class library usage, coding and language questions.
James Miller
Posts: 1
Joined: Wed Mar 17, 2010 5:22 pm

ReadOnlyListWrapper

Post by James Miller » Tue Mar 23, 2010 6:42 pm

While attempting to get to the dropdown menu in an Infragistics UltraDropDownButton, with

Ranorex.Core.Element popupMenu = @"/form[@controltypename='DropDownForm']/element";
IList<Ranorex.Core.Element> popupMenuChildren = popupMenu.Children;

I found a reference to Ranorex.Core.ReadOnlyListWrapper that doesn't seem to be in the Ranorex document or searchable on this forum (since it is longer than 14 characters).

Does anyone have any information about this ReadOnlyListWrapper?

I cannot seem to get to any droplist because "IList<Ranorex.Core.Element> popupMenuGrandChildren = popupMenuChildren[0].Children;" always comes back empty.

?PopupMenu
{Unknown:PopupMenuControlTrusted}
base {System.MarshalByRefObject}: {Unknown:PopupMenuControlTrusted}
Actions: {Ranorex.Core.ReadOnlyListWrapper<Ranorex.Core.ActionDescriptor>}
Attributes: {Ranorex.Core.ReadOnlyListWrapper<Ranorex.Core.AttributeDescriptor>}
Capabilities: {Ranorex.Core.ReadOnlyListWrapper<Ranorex.Core.Capability>}
ChildIndex: 0
Children: {Ranorex.Core.ReadOnlyListWrapper<Ranorex.Core.Element>}
ClientRectangle: {X = -440 Y = -321 Width = 162 Height = 220}
Enabled: false
Events: {Ranorex.Core.ReadOnlyListWrapper<Ranorex.Core.EventDescriptor>}
FlavorName: "winforms"
HasFocus: false
IsSnapshot: false
Limitations: Count = 0
Location: {X = -440 Y = -321}
Parent: {Form:iexplore}
PreferredCapability: {Unknown [element]}
Role: {Unknown [element]}
ScreenLocation: {X = 3 Y = 29}
ScreenRectangle: {X = 3 Y = 29 Width = 162 Height = 220}
Size: {Width = 162 Height = 220}
Valid: true
Visible: false
?popupMenuChildren
{Ranorex.Core.ReadOnlyListWrapper<Ranorex.Core.Element>}
[Ranorex.Core.ReadOnlyListWrapper<Ranorex.Core.Element>]: {Ranorex.Core.ReadOnlyListWrapper<Ranorex.Core.Element>}

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

Re: ReadOnlyListWrapper

Post by Support Team » Wed Mar 24, 2010 10:42 am

Hi James,

I think what you are looking for to get the drop down list of UltraDropDown is the InvokeRemotely function in our Software. The "problem" with the UltraDropDown of Infracistics is that they separate all controls. So in your case take a look at our blog for the InvokeRemotely function.
http://www.ranorex.com/blog/transfering ... ol#more-84
James Miller wrote:Does anyone have any information about this ReadOnlyListWrapper?
This is an internal class implementing the IList interface (see http://msdn.microsoft.com/en-us/library/5y536ey6.aspx), usually you don't ever see that class (only if you inspect the type of the object with the debugger). Therefore, the MSDN interface documentation should suffice.

Regards,
Peter
Ranorex Support Team
.
Image