title: Switch between browser tabs using Selenium WebDriver with Java
body: <p>I need to switch between the browser tabs, used the following code,</p>
  
  <pre><code>driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL +"\t");
  </code></pre>
  
  <p>It was working properly sometimes only, but sometimes it is showing an exception.
  Can anyone suggest me is there any other instructions for switching tabs within a single window by using java.</p>