4

My team has an automation solution that uses watir. In fact, we have 2 versions of it, one for one release of our software and another for another release. I find that changing versions of watir used it not easy, so I want to select the right version for my new project (building an exploratory framework like Jim Knowlton talks about on Watir Podcast #30).

Our product supports IE and Firefox. It could support other browsers in the future such as Chrome or Safari. Most of the interface technologies are supported by watir, though we created a webdriver framework to have better access to attributes.

So I am thinking that the Watir Webdriver may be the best choice for me today. Not having used it or even reviewed other people's happiness with it, I am just not sure if it is ready. What do you think?

4

3 回答 3

5

我认为 watir-webdriver 和 Firefox 驱动程序此时已准备好用于生产,但有一些明显的例外:

拥有一个稳定且可用的 Firefox 驱动程序是我的第一要务,所以我还没有花太多时间测试 IE、Chrome 或 HtmlUnit(远程)。

我们的规范套件(watirspec 的watir2分支)的结果应该很好地表明了浏览器的支持程度:

  • Firefox:通过:94%,总时间:201 秒。
  • Chrome:通过:89%,总时间:1207 秒。
  • IE:通过率:83%,总时间:2238 秒。
于 2010-07-28T15:23:04.273 回答
2

请查看 watir-webdriver 扩展程序 alerts.rb 就可以了

require "watir-webdriver/extensions/alerts"

alert do
  #...code that launches an alert box...
end

confirm true do
  #...code that launches confirm box...
end

如果您想对此进行测试,这些块甚至会返回确认/警报框的值。谢谢,贾里

于 2010-10-15T14:11:15.353 回答
1

我已经用过了,还不错。我只使用了 Firefox 驱动程序,只是为了说明这一点。我已经尝试过 IE 和 Chrome 驱动程序以及那些不如 FF 的驱动程序。

于 2010-07-27T12:07:07.167 回答