return this.page.$eval(selector, (node) => Array .from(node.childNodes) .filter((child) => child.nodeType == Node.TEXT_NODE) .map((child) => child.nodeValue) .join('') .replace(/\s+/g, ' ') .trim() );