I have a circumstance in which clicking a link webpage opens a popup window. And after the popup window opens the focus is in the popup window and master window is disabled. And i am unable to get the control transferred to the popup window.
Please have a look at the following code.
driver.findElement(By.linkText("Click me")).click();// when this line of code is reached then a popup window opens.
System.out.println("After Clicking me"); // After the popup window opens this line of code is never executed.
I am unable to transfer the control from parent window to popup window. I am aware of the following command.
driver.switchTo().window("popup window");
But its not helping much. please help me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…