Find the code for handling multiple windows via windows handler the steps are given in detail here on clicking on the first window a new window shall open and while you move to the new window does not mean moving driver to the 2nd window, but it will still point to parent window so how to move to child window to a parent window is defined here @Test public void test1() throws InterruptedException { System.setProperty("Webdriver.chrome.driver", "chromedriver"); WebDriver driver = new ChromeDriver(); driver.get("https://www.online.citibank.co.in/"); driver.manage().timeouts().implicitlyWait(6, TimeUnit.SECONDS); System.out.println(driver.getTitle()); //gives you ID of current window String pa = driver.getWindowHandle(); System.out.println(pa); //to click on the login button which will open anew window driver.findElement(By.xpath("//*[@title='LOGIN NOW']/img...
A home for beginners in the domain of Software Testing. Join in the journal to learn from experiences earned the hard way