Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

HTML_Object Class Reference

Base class for all HTML elements. More...

Inheritance diagram for HTML_Object:

HTML_Anchor HTML_Array HTML_CustomItem HTML_Document HTML_Form HTML_FormElement HTML_Option HTML_ButtonBase HTML_CustomItemView HTML_Select HTML_TextBase HTML_Button HTML_CheckBox HTML_ImageButton HTML_RadioButton HTML_Text HTML_TextArea List of all members.

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_ObjectfirstChild ()
HTML_ObjectlastChild ()
int numChildren () const
HTML_ObjectnextSibling ()
HTML_ObjectpreviousSibling ()
HTML_ObjectparentElement ()
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)
virtual void doubleClick (int mod=0, int x=0, int y=0)
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)
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

Detailed Description

Base class for all HTML elements.

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.


Member Function Documentation

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_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.

HTML_Object * HTML_Object::firstChild  ) 
 

Returns the first child of the element or an invalid object, if there is none.

const char * HTML_Object::hierarchicalQualifiedName  )  const
 

Returns the hierarchical, qualified name of this object.

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.

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
 

Invokes the function methodName on this object and returns the return value of this call as string.

HTML_Object * HTML_Object::lastChild  ) 
 

Returns the last child of the element or an invalid object, if there is none.

QString HTML_Object::name  )  const
 

Returns the internal JavaScript reference name of this object.

HTML_Object * HTML_Object::nextSibling  ) 
 

Returns the next 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_Object * HTML_Object::previousSibling  ) 
 

Returns the previous sibling of this element or an invalid object, if there is none.

const char * HTML_Object::property const char *  propName  )  const
 

Returns the value (as string) of the property propName of this object.

void HTML_Object::setProperty const char *  propName,
bool  value
 

Sets the property propName of this object to the boolean value.

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,
const char *  value
 

Sets the property propName of this object to the string value.


Property Documentation

const char * HTML_Object::domClassName [read]
 

Returns the object's class name as defined by DOM.

int HTML_Object::height [read]
 

Returns the height of the element.

const char * HTML_Object::id [read]
 

Returns the id of the element.

const char * HTML_Object::innerHTML [read]
 

Returns the inner text of the element with HTML markup.

const char * HTML_Object::innerText [read]
 

Returns the inner text of the element without HTML markup.

int HTML_Object::numChildren [read]
 

Returns the number of child nodes of this element.

const char * HTML_Object::styleDisplay [read]
 

Returns the style.display of the element.

const char * HTML_Object::tagName [read]
 

Returns the HTML tag name of the object (such as DIV or INPUT)

const char * HTML_Object::title [read]
 

Returns the title of the element.

bool HTML_Object::visible [read]
 

Returns the visibility of the element.

int HTML_Object::width [read]
 

Returns the width 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.


Generated on Mon Jun 11 15:49:45 2007 for Squish HTML API by  doxygen 1.4.4