lib/getData.js
function getSelectorValue(page, ph, selector, callback) {
    page.evaluate(function (selector) {
        try {
            return [null, document.querySelector(selector).value];
        } catch (error) {
            return [error];
        }
    }, function (result) {
        var error = result[0];
        var selectorValue = result[1];
        if (error) {
            callback(error, page, ph);
            return;
        }
        callback(null, page, ph, selectorValue);
    }, selector);
}
function getSelectorValue(page, ph, selector, callback) {
    page.evaluate(function (selector) {
        try {
            return [null, document.querySelector(selector).value];
        } catch (error) {
            return [error];
        }
    }, function (result) {
        var error = result[0];
        var selectorValue = result[1];
        if (error) {
            callback(error, page, ph);
            return;
        }
        callback(null, page, ph, selectorValue);
    }, selector);
}
function getSelectorValue ( page , ph , selector , callback ) { page . evaluate ( function ( selector ) { try { return [ null , document . querySelector ( selector ) . value ] ; } catch ( error ) { return [ error ] ; } } , function ( result ) { var error = result [ 0 ] ; var selectorValue = result [ 1 ] ; if ( error ) { callback ( error , page , ph ) ; return ; } callback ( null , page , ph , selectorValue ) ; } , selector ) ; }
Gets the .value of a selector
@param page
@param ph
@param selector
@param {pageResultCallback} callback
Gets the . value of a selector