javascript/selenium-core/scripts/htmlutils.js
function getText(element) {
    var text = "";

    var isRecentFirefox = (browserVersion.isFirefox && browserVersion.firefoxVersion >= "1.5");
    if (isRecentFirefox || browserVersion.isKonqueror || browserVersion.isSafari || browserVersion.isOpera) {
        text = getTextContent(element);
    } else if (element.textContent) {
        text = element.textContent;
    } else if (element.innerText) {
        text = element.innerText;
    }

    text = normalizeNewlines(text);
    text = normalizeSpaces(text);

    return text.trim();
}
function getText(element) {
    var text = "";

    var isRecentFirefox = (browserVersion.isFirefox && browserVersion.firefoxVersion >= "1.5");
    if (isRecentFirefox || browserVersion.isKonqueror || browserVersion.isSafari || browserVersion.isOpera) {
        text = getTextContent(element);
    } else if (element.textContent) {
        text = element.textContent;
    } else if (element.innerText) {
        text = element.innerText;
    }

    text = normalizeNewlines(text);
    text = normalizeSpaces(text);

    return text.trim();
}
function getText ( element ) { var text = "" ; var isRecentFirefox = ( browserVersion . isFirefox && browserVersion . firefoxVersion >= "1.5" ) ; if ( isRecentFirefox || browserVersion . isKonqueror || browserVersion . isSafari || browserVersion . isOpera ) { text = getTextContent ( element ) ; } else if ( element . textContent ) { text = element . textContent ; } else if ( element . innerText ) { text = element . innerText ; } text = normalizeNewlines ( text ) ; text = normalizeSpaces ( text ) ; return text . trim ( ) ; }
Returns the text in this element
Returns the text in this element