title: Selenium switch tab in chromeDriver
body: <p>I'm trying to write a program to switch tab in Chrome Driver.</p>
  
  <p>I use this code </p>
  
  <pre><code> for(String winHandle:driver.getWindowHandles()){
              driver.switchTo().window(winHandle);
          }
  </code></pre>
  
  <p>or </p>
  
  <pre><code>Actions action= new Actions(driver);
  action.keyDown(Keys.CONTROL).sendKeys(Keys.TAB).build().perform();
  </code></pre>
  
  <p>or</p>
  
  <pre><code>driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL +"\t");
  </code></pre>
  
  <p>but not work. Is Someone knows the way how to solve it?</p>