I'm new to selenium testing. so bear with me. I have a web page where when i click a button, a new browser window is opened and I have to fill some stuff there. I was able to to the first part (selecting the button and opening the new browser window).
driver.findElement(By.xpath("//xpath/to/button/id")).click();
but the problem occurs when I try to fill the stuff in that newly popped up browser. I'm using the same driver (may be this could be the problem). when I print the current url path driver.getCurrentUrl(); it shows the previous url (not the redirected one). How to set the newly opened browser to the driver
Can someone help me with this (any tutorial would be nice). Thanks in advance