📜  你如何处理 js 警报? - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:24.236000             🧑  作者: Mango

代码示例3
If the alert on the browser comes from JavaScript, we use to
handle them Alert class.
Alert alert = driver.switchTo.alert();
alert.accept();
alert.dismiss();
alert.sendKeys();
alert.getText();