Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Is it possible to use Watir WebDriver in conjunction with Java? I have to execute some Java methods for dealing with data in DB in order to simulate different situations and test website UI using watir-webdriver.

I've read about JRuby, but could not find anything about whether it works with Watir WebDriver.

Please share your experience!

share|improve this question
1  
Welcome to SQA, mihijs. I do not have any experience with Watir, but a Google search turned up [Watij][watij.com/]. Selenium/Webdriver has a Java API too. –  user246 Dec 17 '12 at 14:48
    
"Watir WebDriver in conjunction with Java" == Watij –  djangofan Jun 17 '13 at 22:03
    
This would be a much better question with more context: what has been tried, what resource gaps or functionality gaps are missing, and tie-in to the actual business problem that's occurring. –  corsiKa Mar 11 at 18:23
add comment

closed as too broad by corsiKa Mar 11 at 18:23

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

Instead of searching if Watir works on JRuby, you could have just tried it, like I did:

$ ruby -v
jruby 1.7.1 (1.9.3p327) 2012-12-03 30a153b on Java HotSpot(TM) 64-Bit Server VM 1.6.0_37-b06-434-11M3909 [darwin-x86_64]

$ gem install watir
...
Successfully installed watir-4.0.2

$ irb

> require "watir"
=> true

> browser = Watir::Browser.new :firefox
=> #<Watir::Browser:0x4fcd5906 url="about:blank" title="">

> browser.goto "google.com"
=> "http://www.google.hr/"

In case it is not clear, Watir works just fine on JRuby.

share|improve this answer
    
The question was whether it works with Java, not JRuby. The approach itself is fine, though: "just try it!" –  dzieciou Dec 17 '12 at 13:28
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.