2

Is there a way to do headless javascript testing in ree (Ruby Enterprise Edition)?

I've seen celerity/culerity/capybara, which work with jruby + HTMLUnit, but I can't seem to get it working with ree. When I simply try to annotate my cucumber test with @culerity under ree, I get jruby: command not found, which of course makes sense, because I'm running under ree, not jruby.

3 Answers 3

4

I have been looking at different libraries to do headless javascript testing.

I have tried akephalos, based on HTMLUnit, which was really promising, but I was unable to get tests working that worked with selenium.

I am now using capybara-webkit, and it works flawlessly. You will need to install Qt before installing the gem. But once that is done (and on ubuntu it is really easy to install), you just add the gem to your Gemfile

gem "capybara-webkit"

And set your Capybara Javascript driver to webkit:

Capybara.javascript_driver = :webkit

And you are good to go. Hope this helps.

Sign up to request clarification or add additional context in comments.

Comments

3

You can use capybara-webkit or run selenium with Xvfb - see this post with explanations on how to set it up.

1 Comment

capybara-webkit and selenium with xvfb both work fine, capybara-webkit is dead easy to setup, but i found selenium to be more stable.
1

take a look also at poltergeist

https://github.com/jonleighton/poltergeist

Capybara.javascript_driver = :poltergeist

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.