title: Pupeteer script freezes
body: <p>I'm writing a script to look domains in a registrar. I managed to get it working, but for some reason the script stops at a random time (after searching 2, 4, 10 domains) and I have no idea why or how I can debug it.
  I'm using Puppeteer, but I'm very very new to this, so perhaps I'm making some basic mistakes.</p>
  
  <p>The script so far is as follows:</p>
  
  <pre><code>const puppeteer = require('puppeteer');
  const DOMS = require('./dominios');
  
  //Traemos los selectores de nic.ar
  
  const SELECTOR_BUSQUEDA = '#edit-txtbuscar';
  const SELECTOR_BOTON = '#btn-consultar-block-submit';
  const SELECTOR_DNS = '#body &gt; div.dialog-off-canvas-main-canvas &gt; div.main-container.container.js-quickedit-main-content &gt; div &gt; section &gt; div &gt; div &gt; div:nth-child(6) &gt; table.tablaRespon3 &gt; tbody &gt; tr:nth-child(1) &gt; td:nth-child(1)';
  
  //Generamos las variables de busqueda
  
  //Funcion principal
  
  async function run() {
    const browser = await puppeteer.launch({
      args: ['--no-sandbox', '--disable-setuid-sandbox', 'headless:false']
    });
    let array_doms = [];
    let respuesta = "";
    array_doms = DOMS.Dominios;
    let bodyHandle;
    let resultado;
    const page = await browser.newPage();
    for (let i = 0; i &lt; array_doms.length; i++) {
      await page.goto('https://nic.ar');
      await page.click(SELECTOR_BUSQUEDA);
      await page.keyboard.type(array_doms[i]);
      await page.click(SELECTOR_BOTON);
      await page.waitForNavigation();
      //Trae el selector de la tabla de resultados de la busqueda
      bodyHandle = await page.$('body &gt; div.dialog-off-canvas-main-canvas &gt; div.main-container.container.js-quickedit-main-content &gt; div &gt; section &gt; div &gt; div &gt; div:nth-child(6) &gt; table.tablaRespon3 &gt; tbody &gt; tr:nth-child(1) &gt; td:nth-child(1)');
      resultado = await page.evaluate(body =&gt; body.innerHTML, bodyHandle);
      await bodyHandle.dispose();
      respuesta = "El dominio " + array_doms[i] + " apunta a " + resultado;
      console.log(respuesta);
    }
  };
  
  run();
  ~
  </code></pre>
  
  <p>I know that the code looks nasty but I'm still learning.</p>