if(BrowserLaunch.browser.equalsIgnoreCase("Firefox"))
{
WebDriverWait wait = new WebDriverWait(Driver.driver, 120);
String parentWin = Driver.driver.getWindowHandle();
Thread.sleep(1000);
BookPlayer.btn_Vocabulary().click();
Thread.sleep(1000);
Driver.driver.switchTo().window(Login_Action.parentWin);
System.out.println(Driver.driver.getTitle());
for (String childWin : Driver.driver.getWindowHandles())
{
if(!Login_Action.parentWin.equals(childWin)){
Driver.driver.switchTo().window(childWin);
Driver.driver.close();
break;
}
}
Thread.sleep(5000);
Driver.driver.switchTo().window(parentWin);