title: Switching between tabs with puppeteer
body: <p>I need a example how to switch betweens tabs with puppeteer</p>
  
  <p>this is currently what i have:</p>
  
  <pre><code>const puppeteer = require('puppeteer');
  
  
  
  (async () =&gt; {
      const browser = await puppeteer.launch({
      headless: false, // launch headful mode
  });
  
  
      const page = await browser.newPage();
      await page.setViewport({ width: 1920, height: 1080 });
                  await page.goto('https://URL1.com');
  
  
  
  
      const pagee = await browser.newPage();
      await pagee.setViewport({ width: 1920, height: 1080 });
                  await pagee.goto('https://URL2.com');
  
  })();
  </code></pre>
  
  <p>So it opens 2 tabs first:Url1, second: Url2</p>
  
  <p>What i need:</p>
  
  <p>first Tab do some action...
  go to second Tab do some action...
  go back to first Tab do some action...</p>
  
  <p>can you guys please provide me a example ?</p>
  
  <p>thank you</p>