runtime/helpers.js
function (htmlCssSelector, attributeName) {

        // get the element from the page
        return driver.findElement(by.css(htmlCssSelector)).then(function(el) {
            return el.getAttribute(attributeName);
        });
    }
function (htmlCssSelector, attributeName) {

        // get the element from the page
        return driver.findElement(by.css(htmlCssSelector)).then(function(el) {
            return el.getAttribute(attributeName);
        });
    }
function ( htmlCssSelector , attributeName ) { // get the element from the page return driver . findElement ( by . css ( htmlCssSelector ) ) . then ( function ( el ) { return el . getAttribute ( attributeName ) ; } ) ; }
returns the value of an attribute on an element
@param {string} htmlCssSelector - HTML css selector used to find the element
@param {string} attributeName - attribute name to retrieve
@returns {string} the value of the attribute or empty string if not found
@example
helpers.getAttributeValue('body', 'class');
returns the value of an attribute on an element