This page is maintained for older versions of Rapise only. The latest documentation can be found at: https://rapisedoc.inflectra.com
HTMLObject

HTMLObject

Top  Previous 

 

This object contains actions and properties for DOM elements of Web page.

 

Behavior Pattern: HTMLBehavior

 

Property Summary

 

Property

Description

Getter

Setter

Alt

Alt of the element.

GetAlt


Checked

'Checked' state of the element.

GetChecked


Class

Class of the element.

GetClass


Enabled

'Enabled' state of the element.

GetEnabled

SetEnabled

Height

Height of the element.

GetHeight


Href

HREF of the element.

GetHref


Id

ID of the element.

GetId


InnerText

Inner text of the element.

GetInnerText


Label

Label of the element.

GetLabel


Name

Name of the element.

GetName


NodeText

Text of the element without children.

GetNodeText


PageTitle

Title of the HTML document.

GetPageTitle


PageURL

Location URL of the HTML document.

GetPageURL


Style

Style of the element.

GetStyle


Tag

Tag name for the element.

GetTag


Title

Title of the element.

GetTitle


Value

Value of the element.

GetValue


Width

Width of the element.

GetWidth


X

X-coordinate of the top left corner of the element.

GetX


XPath

XPATH of the element.

GetXPath


Y

Y-coordinate of the top left corner of the element.

GetY


 

Action Summary

 

Action

Description

DoAddSelection

Adds selection of specified option in multi-select element.

DoClick

Clicks on HTML element (button, link).

DoDblClick

Left Double-Clicks on HTML element (button, link).

DoDOMChildAt

Return nth child (zero-based)

DoDOMChildrenCount

Return parent element having this element

DoDOMConvert

Makes clone of this object converted to a requested type.

DoDOMFindParentWithAttribute

Return parent element (if any) with given attribute matching given string or "regex:.

DoDOMGetAttribute

Return attribute of DOM element.

DoDOMGetAttributes

Returns all attributes of a node.

DoDOMNextSibling

Return next sibling element for this one

DoDOMParent

Return parent element having this element

DoDOMPrevSibling

Return previous sibling element for this one

DoDOMQueryCss

Get array of elements matching CSS selector on this object

DoDOMQueryXPath

Get array of elements matching XPath query on this object

DoDOMRoot

Return root element having this element

DoEnsureVisible

Makes sure specified element is visible on the screen.

DoGetRect

Finds screen rectangle for this object.

DoGetSelection

Gets selected options text of a SELECT element.

DoRemoveSelection

Unselects specified option in multi-select element.

DoSelect

Selects specified element in <select> control.

DoSetCheck

Set check on check box

DoSetText

Sets text for input edit or textarea.

 

Property Detail

 

Alt

Alt of the element.

Accessors: GetAlt

 

Checked

'Checked' state of the element.

Accessors: GetChecked

 

Class

Class of the element.

Accessors: GetClass

 

Enabled

'Enabled' state of the element.

Accessors: GetEnabled, SetEnabled

 

Height

Height of the element.

Accessors: GetHeight

 

Href

HREF of the element.

Accessors: GetHref

 

Id

ID of the element.

Accessors: GetId

 

InnerText

Inner text of the element.

Accessors: GetInnerText

 

Label

Label of the element.

Accessors: GetLabel

 

Name

Name of the element.

Accessors: GetName

 

NodeText

Text of the element without children.

Accessors: GetNodeText

 

PageTitle

Title of the HTML document.

Accessors: GetPageTitle

 

PageURL

Location URL of the HTML document.

Accessors: GetPageURL

 

Style

Style of the element.

Accessors: GetStyle

 

Tag

Tag name for the element.

Accessors: GetTag

 

Title

Title of the element.

Accessors: GetTitle

 

Value

Value of the element.

Accessors: GetValue

 

Width

Width of the element.

Accessors: GetWidth

 

X

X-coordinate of the top left corner of the element.

Accessors: GetX

 

XPath

XPATH of the element.

Accessors: GetXPath

 

Y

Y-coordinate of the top left corner of the element.

Accessors: GetY

 

Action Detail

 

DoAddSelection(optionText)

Adds selection of specified option in multi-select element.

 

Parameters:

 

Name

Type

Description

optionText


text of the option.

 

DoClick(x, y, forceEvent)

Clicks on HTML element (button, link).

 

Parameters:

 

Name

Type

Description

x

Number

X coordinate to click.
Optional.

y

Number

Y coordinate to click.
Optional.

forceEvent

Boolen

pass 'true' to force browser event without actual mouse click.
Optional, Default: false.

 

Returns:

 

'true' if success, 'false' otherwise.

 

DoDblClick()

Left Double-Clicks on HTML element (button, link).

 

Returns:

 

'true' if success, 'false' otherwise.

 

DoDOMChildAt()

Return nth child (zero-based)

 

DoDOMChildrenCount()

Return parent element having this element

 

DoDOMConvert()

Makes clone of this object converted to a requested type. This operation is for internal use only.

 

Returns:

 

New Object of requested type or HTMLObject if type not found, null if error occur.

 

DoDOMFindParentWithAttribute()

Return parent element (if any) with given attribute matching given string or "regex:.." expressino

 

DoDOMGetAttribute()

Return attribute of DOM element.

 

DoDOMGetAttributes()

Returns all attributes of a node.

 

Returns:

 

Array of attributes

 

DoDOMNextSibling()

Return next sibling element for this one

 

DoDOMParent()

Return parent element having this element

 

DoDOMPrevSibling()

Return previous sibling element for this one

 

DoDOMQueryCss()

Get array of elements matching CSS selector on this object

 

DoDOMQueryXPath()

Get array of elements matching XPath query on this object

 

DoDOMRoot()

Return root element having this element

 

DoEnsureVisible()

Makes sure specified element is visible on the screen.

 

DoGetRect()

Finds screen rectangle for this object.

 

Returns:

 

structure {x, y, w, h}.

 

DoGetSelection(delim)

Gets selected options text of a SELECT element. Example: "Option1,Option2".

 

Parameters:

 

Name

Type

Description

delim

String

Separator between options. Default value is ','.
Optional.

 

Returns:

 

String with option values separated by delim.

 

DoRemoveSelection(optionText)

Unselects specified option in multi-select element.

 

Parameters:

 

Name

Type

Description

optionText


text of the option.

 

DoSelect(txt)

Selects specified element in <select> control.

 

Parameters:

 

Name

Type

Description

txt


option name to select.

 

DoSetCheck()

Set check on check box

 

Returns:

 

New Object state

 

DoSetText(text)

Sets text for input edit or textarea.

 

Parameters:

 

Name

Type

Description

text


text to set.