text - web automation propety
Retrieves the text of the web automation Element object.
Applies to:
- Element
var t = elementObj.text;
Arguments:
- None.
Remarks:
-
Unlike the native innerText property,
the text property can be also used on some non-block HTML elements, like <input>.
- For editable HTML controls, the text in the left side is returned.
- For radio and checkbox controls, the text in the right side is returned.
- For buttons, the text on the button is returned.
Example:
// Display the whole text of a HTML document.
var coreObj = new ActiveXObject("Twebst.Core");
var browser = coreObj.FindBrowser("url=http://www.codecentrix.com");
var body = browser.FindElement("body");
WScript.Echo(body.text);
See also:
- Element | nativeElement
©
2014 CodeCentrix Software. All rights reserved.