@Test
public void testWaitAndSwitchToNewBrowserWindow() throws Exception {

    seleniumNavigationService.navigate_to_url(TEST_PAGE_URL);
    seleniumSynchronisationService.checkAndAssertForExpectedCondition(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("input[id='textField']")));
    driver.findElement(By.cssSelector("input[id='textField']")).sendKeys("file:///" + senBotContext.getRuntimeResources() + EXAMPLE_FORM_PAGE_URL);
    seleniumElementService.findExpectedElement(By.cssSelector("button[id='openBrowserWindow']")).click();
    seleniumSynchronisationService.waitAndSwitchToNewBrowserWindow(seleniumManager.getTimeout());
    assertEquals(1, driver.findElements(By.xpath("//*[contains(text(),'Namespace test page')]")).size());
    driver.close();
    seleniumSynchronisationService.switchToMainWindow();
}