Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

146
Vistas
Trying to get the Console Developer tool printed out on the Terminal via puppeteer , I get an Incomplete output

I'm following this tutorial in order to get the Console Tool out of the Terminal via puppeteer Access browser console from a terminal?

But it looks like all I get is a JSON output without the console information I am in need of.

{
    "origin": "http://localhost:81",
    "pathname": "/messing7-js-playground/jsdom.html"
}

I have modified the script of the tutorial to make it workable for my system, so this is what I am executing

const puppeteer = require('puppeteer')

;(async () => {
¦•const browser = await puppeteer.launch({
¦•••|headless: true,
¦•••|args: [
¦•••|•••¦'--no-sandbox',
¦•••|•••¦'--disable-setuid-sandbox',
¦•••|]
})
¦•const page = await browser.newPage()

await page.goto('http://localhost:81/messing7-js-playground/jsdom.html')

¦•const retrievedData = await page.evaluate(() => {

¦•••const { origin, pathname } = window.location;

¦•••return {
¦•••|•origin,
¦•••|•pathname,
¦•••}
¦•})

¦•const retrievedJSON = JSON.stringify(retrievedData, null, 4)

¦•console.log(retrievedJSON)

¦•await browser.close()
})()

I would appreciate you guiding me into the right direction.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda