如何使用Java代码在Selenium rc中关闭警报框. [英] How to dismiss an alert box in selenium rc using java code.
本文介绍了如何使用Java代码在Selenium rc中关闭警报框.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在Eclipse编辑器中使用Selenium RC关闭警报框
我正在根据selenium RC使用Eclipse编辑器中的Java代码编写用于测试Web应用程序的编码.
我做了这样的代码....
how to dismiss the alert box using selenium RC in Eclipse Editor
i am doing a coding for testing web application using java code in Eclipse editor according to selenium RC.
i done a code like this.....
Boolean b=selenium.isAlertPresent();
if(b.equals(true))
{
Alert alert= wd.switchTo().alert();
alert.dismiss();
String error=selenium.getAlert();
return "Error:"+error;
}
但是它显示出诸如无法消除警报之类的错误?是警报存在吗?
But it is showing the errror like UNABLE TO DISMISS THE ALERT?IS THE ALERT PRESENT?
推荐答案
尝试在 ^ ],他们更有可能具备您所需的特定知识.
Try asking this question on the Selenium Users Forum[^], they are more likely to have the specific knowledge you require.
这篇关于如何使用Java代码在Selenium rc中关闭警报框.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文