Enumerating objects

eboxy provides ways to enumerate various elements of the GUI at runtime. Enumeration is provided in the form of a "get count, get item at index" interface.

Enumerating object properties, methods and events

To enumerate properties on an object, first retrieve the value of the propertycount property, and then call the getproperty method in a loop, passing the index (from 0 to count-1) on each iteration. In this way you can retrieve the name of each property on the object. You can do likewise for methods and events by using methodcount/getmethod and eventcount/getevent respectively. These can be used on most types of eboxy object accessible through the plugin API. There is a demonstration of doing this in the testbench plugin.

Enumerating widgets

Page objects have a property widgetcount and a method getwidget which can be used to enumerate the widgets on a particular page in the manner described previously.

Enumerating pages

To enumerate available pages, use the pagecount property and getpage method of the system object.