AndroidObject¶
Android Object.
Behavior Pattern: AndroidObjectGenericBehavior
Property Summary¶
Property | Description | Getter | Setter |
---|---|---|---|
ChildAt | Child object at index. | GetChildAt | |
ChildCount | Number of child items. | GetChildCount | |
Class | Class name of the object. | GetClass | |
Height | Height of the object. | GetHeight | |
Name | Name of the object. | GetName | |
NextSibling | AndroidObject for the next sibling element. |
GetNextSibling | |
ObjectType | Type of the object. | GetObjectType | |
Parent | AndroidObject for the parent element. |
GetParent | |
PrevSibling | AndroidObject for the previous sibling element. |
GetPrevSibling | |
Property | Value of a named property of the object. | GetProperty | |
Text | Text of the object, 'false' if text can not be read. | GetText | |
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 |
---|---|
DoAction | Clicks in the middle of the control. |
DoClear | Clears the text of the object. |
DoClick | Clicks in the middle of the control if offset is not specified. |
DoEnsureVisible | Ensure that a child item with the specified text is visible on screen. |
DoFindByXPath | Finds an element by relative XPath expression. |
DoLongPress | Performs long press in the middle of the control if offset is not specified. |
DoPress | Presses in the middle of the control if offset is not specified. |
DoSendKeys | Send a text to the object in character-by-character mode. |
Property Detail¶
ChildAt¶
Child object at index.
Getter Parameters:
Name | Type | Description |
---|---|---|
index | number | Index of the object to get. |
Type: string
Accessors: GetChildAt
value = SeS('SomeAndroidObject').GetChildAt(index)
ChildCount¶
Number of child items.
Type: number
Accessors: GetChildCount
value = SeS('SomeAndroidObject').GetChildCount()
Class¶
Class name of the object.
Type: string
Accessors: GetClass
value = SeS('SomeAndroidObject').GetClass()
Height¶
Height of the object.
Type: number
Accessors: GetHeight
value = SeS('SomeAndroidObject').GetHeight()
Name¶
Name of the object.
Type: string
Accessors: GetName
value = SeS('SomeAndroidObject').GetName()
NextSibling¶
AndroidObject
for the next sibling element. Requires Rapise 6.6+
Type: AndroidObject
Accessors: GetNextSibling
value = SeS('SomeAndroidObject').GetNextSibling()
ObjectType¶
Type of the object.
Type: string
Accessors: GetObjectType
value = SeS('SomeAndroidObject').GetObjectType()
Parent¶
AndroidObject
for the parent element. Requires Rapise 6.6+
Type: AndroidObject
Accessors: GetParent
value = SeS('SomeAndroidObject').GetParent()
PrevSibling¶
AndroidObject
for the previous sibling element. Requires Rapise 6.6+
Type: AndroidObject
Accessors: GetPrevSibling
value = SeS('SomeAndroidObject').GetPrevSibling()
Property¶
Value of a named property of the object.
Getter Parameters:
Name | Type | Description |
---|---|---|
name | string | Property name. |
Type: string
Accessors: GetProperty
value = SeS('SomeAndroidObject').GetProperty(name)
Text¶
Text of the object, 'false' if text can not be read.
Type: string
Accessors: GetText
value = SeS('SomeAndroidObject').GetText()
Width¶
Width of the object.
Type: number
Accessors: GetWidth
value = SeS('SomeAndroidObject').GetWidth()
X¶
X-coordinate of the top left corner of the object.
Type: number
Accessors: GetX
value = SeS('SomeAndroidObject').GetX()
Y¶
Y-coordinate of the top left corner of the object.
Type: number
Accessors: GetY
value = SeS('SomeAndroidObject').GetY()
Action Detail¶
DoAction¶
Clicks in the middle of the control.
SeS('SomeAndroidObject').DoAction()
Returns:
boolean: 'true' if success, 'false' otherwise.
DoClear¶
Clears the text of the object.
SeS('SomeAndroidObject').DoClear()
Returns:
boolean: 'true' if success, 'false' otherwise.
DoClick¶
Clicks in the middle of the control if offset is not specified. Clicking with offset requires Rapise 8.0+.
SeS('SomeAndroidObject').DoClick(x, y)
Parameters:
Name | Type | Description |
---|---|---|
x | number | X offset to click within object. Calculated from the top-left corner. Default is a center. Floating point in the range (-2, 2) means percentage of the width. Optional. |
y | number | Y offset to click within object. Calculated from the top-left corner. Default is a center. Floating point in the range (-2, 2) means percentage of the height. Optional. |
Returns:
boolean: 'true' if success, 'false' otherwise.
DoEnsureVisible¶
Ensure that a child item with the specified text is visible on screen.
SeS('SomeAndroidObject').DoEnsureVisible(text)
Parameters:
Name | Type | Description |
---|---|---|
text | string | Text to search for. |
Returns:
boolean: 'true' if success, 'false' otherwise.
DoFindByXPath¶
Finds an element by relative XPath expression. Requires Rapise 6.6+
SeS('SomeAndroidObject').DoFindByXPath(xpath)
Parameters:
Name | Type | Description |
---|---|---|
xpath | string | Relative XPath expression. |
Returns:
AndroidObject: AndroidObject
if success, null
otherwise.
DoLongPress¶
Performs long press in the middle of the control if offset is not specified. Requires Rapise 8.0+.
SeS('SomeAndroidObject').DoLongPress(x, y)
Parameters:
Name | Type | Description |
---|---|---|
x | number | X offset to click within object. Calculated from the top-left corner. Default is a center. Floating point in the range (-2, 2) means percentage of the width. Optional. |
y | number | Y offset to click within object. Calculated from the top-left corner. Default is a center. Floating point in the range (-2, 2) means percentage of the height. Optional. |
Returns:
boolean: 'true' if success, 'false' otherwise.
DoPress¶
Presses in the middle of the control if offset is not specified. Requires Rapise 8.0+.
SeS('SomeAndroidObject').DoPress(x, y, duration)
Parameters:
Name | Type | Description |
---|---|---|
x | number | X offset to click within object. Calculated from the top-left corner. Default is a center. Floating point in the range (-2, 2) means percentage of the width. Optional. |
y | number | Y offset to click within object. Calculated from the top-left corner. Default is a center. Floating point in the range (-2, 2) means percentage of the height. Optional. |
duration | number | Duration of press action. Optional. |
Returns:
boolean: 'true' if success, 'false' otherwise.
DoSendKeys¶
Send a text to the object in character-by-character mode.
SeS('SomeAndroidObject').DoSendKeys(keys)
Parameters:
Name | Type | Description |
---|---|---|
keys | string | Text to type into the object. |
Returns:
boolean: 'true' if success, 'false' otherwise.