
Public Member Functions | |
| HTML_Object (const QString &n, const QString &jsref) | |
| virtual const char * | className () const |
| const char * | domClassName () const |
| const char * | tagName () const |
| const char * | innerText () const |
| const char * | innerHTML () const |
| const char * | id () const |
| const char * | title () const |
| const char * | styleDisplay () const |
| bool | visible () const |
| int | x () const |
| int | y () const |
| int | width () const |
| int | height () const |
| HTML_Object * | firstChild () |
| HTML_Object * | lastChild () |
| int | numChildren () const |
| HTML_Object * | nextSibling () |
| HTML_Object * | previousSibling () |
| HTML_Object * | parentElement () |
| HTML_XPathResult | evaluateXPath (const char *statement) const |
| void | setProperty (const char *propName, const char *value) |
| void | setProperty (const char *propName, int value) |
| void | setProperty (const char *propName, bool value) |
| const char * | property (const char *propName) const |
| const char * | invoke (const char *methodName) const |
| const char * | invoke (const char *methodName, const char *arg1) const |
| const char * | invoke (const char *methodName, const char *arg1, const char *arg2) const |
| operator const char * () const | |
| void | invalidate () |
| virtual void | click (int mod=0, int x=0, int y=0, int button=1) |
| virtual void | doubleClick (int mod=0, int x=0, int y=0) |
| virtual void | openContextMenu () |
| QString | name () const |
| const char * | hierarchicalQualifiedName () const |
Protected Member Functions | |
| QString | jsReference () const |
| Squish::WebHook * | webHook () const |
| QString | eval (const QString &code) const |
| QRect | getElementRect () const |
| QString | clickOn (const char *jsref, int m=0, int x=0, int y=0, int button=1) |
| QString | dblClickOn (const char *jsref, int m=0, int x=0, int y=0) |
Properties | |
| char | domClassName |
| char | tagName |
| char | innerText |
| char | innerHTML |
| char | title |
| int | numChildren |
| char | id |
| char | styleDisplay |
| bool | visible |
| int | x |
| int | y |
| int | width |
| int | height |
This is generic class for all HTML elements. The functions and properties defined in this class are available for all objects which are returned from Squish's findObject() function.
| const char * HTML_Object::className | ( | ) | const [inline, virtual] |
Returns the specialized class name of the HTML object, such as HTML_Button.
Reimplemented in HTML_Array, HTML_Document, HTML_Form, HTML_FormElement, HTML_ButtonBase, HTML_Button, HTML_RadioButton, HTML_CheckBox, HTML_ImageButton, HTML_TextBase, HTML_Text, HTML_TextArea, HTML_Option, HTML_Select, HTML_Anchor, HTML_CustomItemView, and HTML_CustomItem.
| HTML_Object * HTML_Object::firstChild | ( | ) |
Returns the first child of the element or an invalid object, if there is none.
| HTML_Object * HTML_Object::lastChild | ( | ) |
Returns the last child of the element or an invalid object, if there is none.
| HTML_Object * HTML_Object::nextSibling | ( | ) |
Returns the next sibling of this element or an invalid object, if there is none.
| HTML_Object * HTML_Object::previousSibling | ( | ) |
Returns the previous sibling of this element or an invalid object, if there is none.
| HTML_Object * HTML_Object::parentElement | ( | ) |
Returns the parent element of this element or an invalid object, if there is none (which can only be the case for the document node of a web site).
| HTML_XPathResult HTML_Object::evaluateXPath | ( | const char * | statement | ) | const |
Evaluates the XPath statement statement and returns the result. As context node for the XPath evaluation this object is used.
This allows to efficiently operate on the DOM document of the web application to e.g. retrieve elements and access them.
| void HTML_Object::setProperty | ( | const char * | propName, | |
| const char * | value | |||
| ) |
Sets the property propName of this object to the string value.
Referenced by HTML_RadioButton::setChecked(), HTML_CheckBox::setChecked(), HTML_FormElement::setDisabled(), HTML_Select::setSelectedIndex(), HTML_Option::setText(), HTML_Option::setValue(), HTML_TextBase::setValue(), and HTML_ButtonBase::setValue().
| void HTML_Object::setProperty | ( | const char * | propName, | |
| int | value | |||
| ) |
Sets the property propName of this object to the number value.
| void HTML_Object::setProperty | ( | const char * | propName, | |
| bool | value | |||
| ) |
Sets the property propName of this object to the boolean value.
| const char * HTML_Object::property | ( | const char * | propName | ) | const |
Returns the value (as string) of the property propName of this object.
| const char * HTML_Object::invoke | ( | const char * | methodName | ) | const |
Invokes the function methodName on this object and returns the return value of this call as string.
Referenced by HTML_FormElement::focus(), and HTML_Form::submit().
| const char * HTML_Object::invoke | ( | const char * | methodName, | |
| const char * | arg1 | |||
| ) | const |
Invokes the function methodName on this object and passes arg1 to it and returns the return value of this call as string.
| const char * HTML_Object::invoke | ( | const char * | methodName, | |
| const char * | arg1, | |||
| const char * | arg2 | |||
| ) | const |
Invokes the function methodName on this object and passes arg1 and arg2 to it and returns the return value of this call as string.
| QString HTML_Object::name | ( | ) | const |
Returns the internal JavaScript reference name of this object.
| const char * HTML_Object::hierarchicalQualifiedName | ( | ) | const |
Returns the hierarchical, qualified name of this object.
const char * HTML_Object::domClassName [read] |
Returns the object's class name as defined by DOM.
const char * HTML_Object::tagName [read] |
Returns the HTML tag name of the object (such as DIV or INPUT)
const char * HTML_Object::innerText [read] |
Returns the inner text of the element without HTML markup.
const char * HTML_Object::innerHTML [read] |
Returns the inner text of the element with HTML markup.
const char * HTML_Object::title [read] |
Returns the title of the element.
int HTML_Object::numChildren [read] |
Returns the number of child nodes of this element.
const char * HTML_Object::id [read] |
Returns the id of the element.
const char * HTML_Object::styleDisplay [read] |
Returns the style.display of the element.
bool HTML_Object::visible [read] |
Returns the visibility of the element.
int HTML_Object::x [read] |
Returns the absolute X position of the element.
int HTML_Object::y [read] |
Returns the absolute Y position of the element.
int HTML_Object::width [read] |
Returns the width of the element.
int HTML_Object::height [read] |
Returns the height of the element.
1.5.6