Count number of tabs open in Selenium Python
<p>How do I count number of tabs are being opened in Browser by using Python Selenium?</p>

<blockquote>
  <p>How do I count number of tabs are being opened in Browser by using Python Selenium?</p>
</blockquote>

<p>Since provided <a href="http://sqa.stackexchange.com/questions/9553/counting-the-number-of-browser-windows-opened-by-selenium">link answer</a> doesn't have any answer in python, you can get the count number of tabs opened in browser using <a href="http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.window_handles" rel="nofollow"><code>WebDriver#window_handles</code></a> as below :-</p>

<pre><code>len(driver.window_handles)
</code></pre>

python selenium count tabs