I think that you mean watir-classic for IE and watir-webdriver for chrome/ff. Watir is just a meta gem, which installs all the necessary gems and allows to switch between the two. The only limitation is that you cannot switch between the two more than once during one Ruby process.
This means that you have to drive the selection from outside, if you want to switch between them for different Ruby processes. One way to do that would be to use environment variables. For example, on your command line you can do it like this: set WATIR_DRIVER=classic ruby your_test.rb set WATIR_DRIVER=webdriver ruby your_test.rb And your_test.rb should be like this: require "watir" Watir::Browser.new If you want to switch between chrome and firefox too, then you may use a custom environment variable, for example WATIR_BROWSER: set WATIR_BROWSER=chrome And use that variable in your_test.rb: require "watir" Watir::Browser.new ENV["WATIR_BROWSER"] || :ie When it comes to incompatibilities between webdriver and classic, it depends what code have you written. If you have written for example Firefox profile specific code then that won't obviously work with watir-classic. In other words, if you've been just using plain Watir API then it should work 99% between the two. You can check out some differences and API from watirspec, which they both run against - http://github.com/watir/watirspec Let us know if you have any specific problems or questions. Jarmo Pertman ----- IT does really matter - http://itreallymatters.net On Friday, November 30, 2012 1:40:52 PM UTC+2, Kapil Rajak wrote: > > I was using watir-webdriver for automation, but having some known focusing > issue like: link > here<http://stackoverflow.com/questions/10204725/ie-cannot-work-with-c-sharp-selenium-script-while-firefox-works-well>- > wasn't able to click links, sometimes it wasn't able to find a > html-component. I thank to Alister Scott for his suggestion to use watir > for IE and watir-webdriver for chrome/ff. He says latest version of watir > supports switching between the two. But document on github, says it has the > limitation. So please let me know the version which supports it and the way > I can do that. > > As mentioned, I have developed the whole code based on webdriver, so is > there any specific code which may not be compatible with watir-which; I > need to change? > Because, I started using watir, but finding problems, still to find the > root cause. > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
