title: How to open multiple webpages in separate tabs within a browser using selenium-webdriver and python
body: <p>I want to open mulitple local htmls within same browser window using Selenium Webdriver using Python. I have tried following in Jupyter notebook:</p>
  
  <pre><code>from selenium import webdriver
  
  1page = "file://&lt;path for 1.html&gt;"
  2page = "file://&lt;path for 2.html&gt;"
  firefox_path = 'C:\geckodriver.exe'
  
  driver = webdriver.Firefox(executable_path= firefox_path)
  driver.get(1page)
  # For opening 2nd HTML in another Tab
  driver.execute_script('''window.open('''+ 2page + ''',"_blank");''')
  </code></pre>
  
  <p>Running above code lead me to the following error:</p>
  
  <pre><code>JavascriptException: Message: Error: Access to 'file://&lt;path of 2.html&gt;' from script denied
  </code></pre>
  
  <p>How to mitigate this error?</p>