Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If I start anew, should I start with Watir-WebDriver?

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?

like image 495
Dave McNulla Avatar asked Feb 26 '23 15:02

Dave McNulla


2 Answers

I consider watir-webdriver with the Firefox driver ready for production use at this point, with some notable exceptions:

  • Frame support still needs more work
  • Alerts/prompts not supported
  • Table API is incomplete/unfinished

Having a stable and usable Firefox driver is my #1 priority, so I haven't yet spent much time testing IE, Chrome or HtmlUnit (remote).

The results from our spec suite (the watir2 branch of watirspec) should give a nice indication of how well the browsers are supported:

  • Firefox: passing: 94%, total time: 201 seconds.
  • Chrome: passing: 89%, total time: 1207 seconds.
  • IE: passing: 83%, total time: 2238 seconds.
like image 179
jarib Avatar answered Mar 07 '23 15:03

jarib


Please check out the watir-webdriver extension alerts.rb just do

require "watir-webdriver/extensions/alerts"

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

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

The blocks even return the value of the confirm/alert box if you want to test for that. Thanks, Jari

like image 45
Mads Buus Avatar answered Mar 07 '23 15:03

Mads Buus