Page 1 of 1

ReadOnlyListWrapper

Posted: Tue Mar 23, 2010 6:42 pm
by James Miller
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>}

Re: ReadOnlyListWrapper

Posted: Wed Mar 24, 2010 10:42 am
by Support Team
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