mercredi 14 février 2018

Selenium : handling popups

I'm getting an error while handling default popups with selenium scripts.

@Test
public void handlePop() {

    WebElement pop1 = driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_PopupCTRLMain_imgNext']"));
    pop1.click();

    WebElement pop2 = driver.findElement(By.xpath("//*[@id='ctl00_ContentPlaceHolder1_PopupCTRLMain_Image2']"));
    pop2.click();
}

Aucun commentaire:

Enregistrer un commentaire