ManagedObject¶
Generic .NET Managed Object.
UI element class: regex:.*
Extends SeSSimulatedObject
Behavior Pattern: ManagedObjectGenericBehavior
Property Summary¶
Property | Description | Getter | Setter |
---|---|---|---|
ControlType | Type of the object. | GetControlType | |
Enabled | 'Enabled' state of the element. | GetEnabled | |
Height | Height of the object. | GetHeight | |
Visible | Returns true if the element is visible on screen. |
GetVisible | |
Width | Width of the object. | GetWidth | |
X | X-coordinate of the top left corner of the object. | GetX | |
Y | Y-coordinate of the top left corner of the object. | GetY |
Action Summary¶
Action | Description |
---|---|
DoDumpWidget | Dumps Spy data for the object. |
DoFindByName | Find nested element by its text (Value, Name of each element are compared with specified text or regular expression). |
DoFindByText | Find nested element by its text (Value, Name of each element are compared with specified text or regular expression). |
DoGetWidgetProperty | Returns the value of a property with a given name. |
Property Detail¶
ControlType¶
Type of the object.
Type: string
Accessors: GetControlType
value = SeS('SomeManagedObject').GetControlType()
Enabled¶
'Enabled' state of the element.
Type: boolean
Accessors: GetEnabled
value = SeS('SomeManagedObject').GetEnabled()
Height¶
Height of the object.
Type: number
Accessors: GetHeight
value = SeS('SomeManagedObject').GetHeight()
Visible¶
Returns true
if the element is visible on screen. Requires Rapise 8.0+.
Type: boolean
Accessors: GetVisible
value = SeS('SomeManagedObject').GetVisible()
Width¶
Width of the object.
Type: number
Accessors: GetWidth
value = SeS('SomeManagedObject').GetWidth()
X¶
X-coordinate of the top left corner of the object.
Type: number
Accessors: GetX
value = SeS('SomeManagedObject').GetX()
Y¶
Y-coordinate of the top left corner of the object.
Type: number
Accessors: GetY
value = SeS('SomeManagedObject').GetY()
Action Detail¶
DoDumpWidget¶
Dumps Spy data for the object.
SeS('SomeManagedObject').DoDumpWidget(dumpProperties, maxDepth, trimValue, indent, filePath, append, ignoreProps)
Parameters:
Name | Type | Description |
---|---|---|
dumpProperties | boolean | If 'true' then includes properties to the result. Optional, Default: "false". |
maxDepth | number | Determines max recursion depth. If '0' then dumps current object only, if '1' - dumps direct children as well, etc. If '-1' then dumps the whole subtree of objects. Optional, Default: "0". |
trimValue | number | Determines maximum length of a property value. Excess characters are truncated. Optional, Default: "256". |
indent | string | Indentation string for child objects and properties. Optional, Default: "\". |
filePath | string | If 'filePath' is set then outputs result to corresponding file. Optional, Default: "". |
append | boolean | If 'true' then file should be overwritten, if 'false' then data should be appended. Optional, Default: "false". |
ignoreProps | Array | Contains the names of the properties which must be ignored when writing into a file. Optional, Default: "undefined". |
Returns:
string |
boolean: Object data if 'filePath' is not set, 'true' if file write succeeded, 'false' - otherwise.
DoFindByName¶
Find nested element by its text (Value, Name of each element are compared with specified text or regular expression).
SeS('SomeManagedObject').DoFindByName(textOrRegexp, depth)
Parameters:
Name | Type | Description |
---|---|---|
textOrRegexp | string | plain string or regexp:... expression to match |
depth | number | depth level for search (default is 3) Optional, Default: "3". |
Returns:
object: Object containing text if found, null otherwise
DoFindByText¶
Find nested element by its text (Value, Name of each element are compared with specified text or regular expression).
SeS('SomeManagedObject').DoFindByText(textOrRegexp, depth)
Parameters:
Name | Type | Description |
---|---|---|
textOrRegexp | string | plain string or regexp:... expression to match |
depth | number | depth level for search (default is 3) Optional, Default: "3". |
Returns:
object: Object containing text if found, null otherwise
DoGetWidgetProperty¶
Returns the value of a property with a given name. Names of available properties can be seen in Spy.
SeS('SomeManagedObject').DoGetWidgetProperty(name)
Parameters:
Name | Type | Description |
---|---|---|
name | string | Property name. |
Returns:
string: Property value if successful, an empty string if the property can not be found.