title: Selenium - How to get the number of tabs opened in a window?
body: <p>My test case :</p>
  
  <ol>
  <li>Open a browser and visit a URL</li>
  <li>Click on a link on the homepage -> This opens a new window/new tab.</li>
  <li>Go back to the homepage. </li>
  <li>Click another link.</li>
  <li>Ensure new content shows up on previously opened child window/child tab from step 2.</li>
  </ol>
  
  <p>I can check the number of windows open by getting a count of the windowhandles, and assert that it is equal to 2 -  to ensure that on clicking the second link, the content refreshes on the same child window and doesn't open another new window.</p>
  
  <p>If in case the links open in new tabs, how can I check this test case ( New tab opened the first time a link is clicked on the homepage. And on further clicking any links on the homepage, content is refreshed on the same new tab)? Is there a way to count the number of tabs in a window?</p>
  
  <p>Or does selenium force new tabs to be opened as new windows instead?</p>