driver.findElement(By.xpath(\"//input[@value=\'添加\']\")).click(); //Pops out an Alert and program stops, does not continue
how to click the alert
Alert alert = driver.switchTo().alert(); alert.accept();
If you want to cancel the pop up use the following:
alert.dismiss();
instead of
alert.accept():