title: Puppeteer: Access fields on login dialog
body: <p>I am trying to generate a .pdf from a page in our Intranet via Puppeteer / Headless Chrome using Node.js.</p>
  
  <p>Generating a .pdf from a random page is no problem, but I am struggling with our login frame, which appears when opening the page.</p>
  
  <p>It looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/OENUf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OENUf.png" alt="Login"></a></p>
  
  <p>I can't find a way to access those two fields "Nutzername" and "Passwort" to get logged in because the Developer Tools from Chrome don't show a field name.</p>
  
  <p>The .pdf file or screenshot which gets generated when opening this page always shows "Unauthorized" as if Headless Chrome pressed Abbrechen (Abort) in this dialog.</p>
  
  <p>What I tried so far was like this:</p>
  
  <pre><code>const puppeteer = require('puppeteer');
  
  (async () =&gt; {
      let url = 'http://intranet...../'
      let browser = await puppeteer.launch()
      let page = await browser.newPage()
      await page.goto(url, {waitUntil: 'networkidle2' })
  
      await page.type('#Nutzername', '....'); // Error here, because the identifier is wrong.
  
      await page.keyboard.press("Tab");
  
      await page.type('#Passwort', '....');
  
      await page.type(String.fromCharCode(13)); // Enter
  
      await page.pdf({
          format:"A4",
          path:'./Speiseplan.pdf',
          displayHeaderFooter: false,
          printBackground:true
      })
      process.exit()
  })();
  </code></pre>
  
  <p>Is it not possible to use Puppeteer with those kind of login dialogs?</p>