0

我尝试使用“watir-webdriver”,它工作得很好(在 Ubuntu Linux 11.10 上,带有 Firefox)。

但是,对于一个检查浏览器并显示模式警报的网站,在调用“goto()”方法时出现错误:

b.goto('http://www.website.com/that/checks/the/browser/and/displays/modal/alert.html')
Selenium::WebDriver::Error::UnhandledAlertError: Modal dialog present
        from [remote server] file://....

这是 HTML 页面的内容:

<script type='text/javascript' language='JavaScript'>browserCheck();</script>

如何避免出现此错误?

问候,

下午

4

0 回答 0