vendredi 2 février 2018

How to switch control to new window if new window is opening only after closing the existing window, I am using selenium and Internet Explorer?

for (String h : webDriver.getWindowHandles()) {

        webDriver.switchTo().window(h);}

    WebElement element= webDriver.findElement(By.xpath("//*[@id='Standard']/p[1]"));
    Actions a = new Actions(webDriver);
    a.moveToElement(element).build().perform();

Aucun commentaire:

Enregistrer un commentaire