HTMLObject

Top  Previous  Next

 

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

 

Behavior Pattern: HTMLFirefoxBehavior

 

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


ClientX

X-coordinate of the top left corner of the element relative to browser window.

GetClientX


ClientY

Y-coordinate of the top left corner of the element relative to browser window.

GetClientY


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 of 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

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

DoDOMChildAt

Returns n-th child (zero-based).

DoDOMChildrenCount

Returns number of children elements for this one.

DoDOMConvert

Creates a clone of this object converted to a requested type.

DoDOMFindParentWithAttribute

Returns parent element (if any) with given attribute matching given string or 'regex:.

DoDOMGetAttribute

Returns specified attribute.

DoDOMGetAttributes

Returns all attributes of a node.

DoDOMNextSibling

Returns next sibling element for this one.

DoDOMParent

Returns parent element having this element.

DoDOMPrevSibling

Return previous sibling element for this one.

DoDOMQueryXPath

Gets array of elements matching XPath query on this object.

DoDOMRoot

Returns Root element having this element.

DoEnsureVisible

Makes sure specified element is visible on the screen.

DoGetRect

Finds screen rectangle for this object.

DoRemoveSelection

Unselect of specified option in multi-select element.

DoSelect

Selects specified element in <select> control.

DoSetCheck

Sets specified state of 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

 

ClientX

X-coordinate of the top left corner of the element relative to browser window.

Accessors: GetClientX

 

ClientY

Y-coordinate of the top left corner of the element relative to browser window.

Accessors: GetClientY

 

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 of 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

string

Element to select

 

Returns:

 

'true' if successful, 'false' otherwise'

 

DoClick(x, y, forceEvent)

Clicks on HTML element (button, link).

 

Parameters:

 

Name

Type

Description

x

number

X coordinate to click.

y

number

Y coordinate to click.

forceEvent

boolean

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

 

Returns:

 

'true' if successful, 'false' otherwise'

 

DoDblClick()

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

 

Returns:

 

'true' if successful, 'false' otherwise'

 

DoDOMChildAt(n)

Returns n-th child (zero-based).

 

Parameters:

 

Name

Type

Description

n

number

n Index of the child element.

 

Returns:

 

n-th child.

 

DoDOMChildrenCount()

Returns number of children elements for this one.

 

Returns:

 

Number of children elements.

 

DoDOMConvert(type)

Creates a clone of this object converted to a requested type.

 

Parameters:

 

Name

Type

Description

type

string

Type of an object.

 

Returns:

 

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

 

DoDOMFindParentWithAttribute(attrName, match)

Returns parent element (if any) with given attribute matching given string or 'regex:...' expression.

 

Parameters:

 

Name

Type

Description

attrName

string

Name of an attribute.

match

string

Match string.

 

Returns:

 

Matched element or 'null'.

 

DoDOMGetAttribute(attrName)

Returns specified attribute.

 

Parameters:

 

Name

Type

Description

attrName

string

Name of an attribute.

 

Returns:

 

Attribute value.

 

DoDOMGetAttributes()

Returns all attributes of a node.

 

Returns:

 

Array of attributes.

 

DoDOMNextSibling()

Returns next sibling element for this one.

 

Returns:

 

Next sibling element.

 

DoDOMParent()

Returns parent element having this element.

 

Returns:

 

Parent element.

 

DoDOMPrevSibling()

Return previous sibling element for this one.

 

Returns:

 

Previous sibling element.

 

DoDOMQueryXPath(xpath)

Gets array of elements matching XPath query on this object.

 

Parameters:

 

Name

Type

Description

xpath

string

Xpath query.

 

Returns:

 

Array of matched elements.

 

DoDOMRoot()

Returns Root element having this element.

 

Returns:

 

Root element having this element.

 

DoEnsureVisible()

Makes sure specified element is visible on the screen.

 

Returns:

 

Rectangle of the element if it became visible, 'null' otherwise.

 

DoGetRect()

Finds screen rectangle for this object.

 

Returns:

 

Object {x, y, w, h}

 

DoRemoveSelection(optionText)

Unselect of specified option in multi-select element.

 

Parameters:

 

Name

Type

Description

optionText

string

Element to remove selection

 

Returns:

 

'true' if successful, 'false' otherwise'

 

DoSelect(txt)

Selects specified element in <select> control.

 

Parameters:

 

Name

Type

Description

txt

string

Element to select

 

Returns:

 

'true' if successful, 'false' otherwise'

 

DoSetCheck(bcheck)

Sets specified state of check box.

 

Parameters:

 

Name

Type

Description

bcheck

boolean

State to set

 

Returns:

 

'true' if successful, 'false' otherwise'

 

DoSetText(txt)

Sets text for input edit or textarea.

 

Parameters:

 

Name

Type

Description

txt

string

Text to set

 

Returns:

 

'true' if successful, 'false' otherwise'

 

Behavior Pattern: HTMLFirefoxFlashBehavior