I am trying to write some capybara cucumber scripts for my ROR app and find it very hard to get the scripts right by making change and running the full feature every time.
Is there a REPL (Read Eval Print Loop) for Capybara so that I can test small chunks of code for correctness faster?
Ok, my teammate found it... We can use irb and load capybara, then we can visit a page and do all the capybara pattern matching to our hearts content!
irb -r rubygems -r capybara -r capybara/dsl
> Capybara.default_driver = :selenium
> include Capybara::DSL
> page = Capybara.page
> page.visit("http://someurl.in")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With