title: Pupeteer - Error: Evaluation failed: ReferenceError: TABLE_ROW_SELECTOR is not defined
body: <p><a href="https://i.stack.imgur.com/PJYUf.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PJYUf.jpg" alt="enter image description here"></a></p>
  
  <p>I'm getting started with pupeteer and node and using vscode. I'm trying to log into a site and scrape a table. So far I have:</p>
  
  <pre><code>(async () =&gt; {
  
  const browser = await puppeteer.launch({
    headless: false,
  });
  var page = await browser.newPage();
  await page.goto('thesite.com/login/');
  
  await page.click(USERNAME_SELECTOR);
  
  await page.keyboard.type(CREDS.username);
  
  await page.click(PASSWORD_SELECTOR);
  await page.keyboard.type(CREDS.password);
  
  await page.click(BUTTON_SELECTOR);
  await page.waitForNavigation();
  
  const TABLE_ROW_SELECTOR = '.gv-container.gv-container-133 &gt; table &gt; tbody';
  await page.waitForSelector(TABLE_ROW_SELECTOR);
  
  await page.waitForSelector(TABLE_ROW_SELECTOR);
  
  
  await page.screenshot({ path: 'example.png' });  
  const data = await page.evaluate(() =&gt; document.querySelectorAll(TABLE_ROW_SELECTOR));
  
  
  
  
  await browser.close();
  })();
  </code></pre>
  
  <p>This is mostly working. the script appears to execute down to :</p>
  
  <pre><code>const data = await page.evaluate(() =&gt; document.querySelectorAll(TABLE_ROW_SELECTOR));
  </code></pre>
  
  <p>where it gives the error in the title. The screenshot is above does not show the table which is below the location of the screenshot. When I enter </p>
  
  <pre><code>document.querySelectorAll(TABLE_ROW_SELECTOR));
  </code></pre>
  
  <p>into the devtools console I get the expected html. What am I doing wrong?</p>
  
  <p>EDIT:</p>
  
  <p>in my console I see a list of objects but as far as I can tell no values. Heres the fiest object</p>
  
  <pre><code>0:Object {}
  __proto__:Object {constructor: , __defineGetter__: , __defineSetter__: , …}
  __defineGetter__:function __defineGetter__() { … }
  __defineSetter__:function __defineSetter__() { … }
  __lookupGetter__:function __lookupGetter__() { … }
  __lookupSetter__:function __lookupSetter__() { … }
  constructor:function Object() { … }
  hasOwnProperty:function hasOwnProperty() { … }
  No debug adapter, can not send 'variables'
  isPrototypeOf:function isPrototypeOf() { … }
  No debug adapter, can not send 'variables'
  </code></pre>
  
  <p>What does "    No debug adapter, can not send 'variables'" mean?</p>