I am using Selenium with Java, and I am using this code to switch between tabs in Mozilla, but it is opening a new window instead of a new tab. How do solve this, or is there another way to switch between tabs?
WebDriver shiva=new FirefoxDriver();
shiva.manage().window().maximize();
shiva.get("http://www.naukri.com/");
Thread.sleep(3000);
shiva.findElement(By.xpath("/html/body/div[1]/div/ul[1]/li[2]/a")).click();
shiva.findElement(By.xpath("/html/body/div[1]/div/ul[1]/li[1]/a")).sendKeys(Keys.CONTROL +"\t");