title: How to use one selenium webdriver for multiple browsing tabs in one window and access them individually?
body: <p>Based on what I've read in stackoverflow, it seems that I need to send keys to open tab and then open a particular website. However, it's quite complicated to do so and I ended up using multiple webdrivers because it's way simpler.</p>
  <p>Here's my dummy code:</p>
  <pre><code>from selenium import webdriver
  
  chrome_options = webdriver.ChromeOptions()
  chrome_options.add_argument(&quot;--incognito&quot;)
  driver1 = webdriver.Chrome(executable_path=dirPath + &quot;/chromedriver&quot; + str(1),
              options = chrome_options
  driver2 = webdriver.Chrome(executable_path=dirPath + &quot;/chromedriver&quot; + str(2),
              options = chrome_options
  driver1.get(&quot;website1&quot;)
  driver2.get(&quot;website2&quot;)
  </code></pre>
  <p>This then can be parallelized using multiprocessing. However it seems that this consumes a lot of RAM especially if I parallelize 10 webdrivers, each for one window. I was thinking of opening 10 tabs in 1 browser and then access each tab separately but got no solution. The goal is to open multiple tabs in one browser and use something like driver.get() in that tab without using keys.</p>
  <p>Additional info: this setup crashed with seg fault 11 on pycharm but works fine in terminal</p>