Capybara does not pass header after form submit

This feature was added to Capybara on April 25th, 2011 with this commit – https://github.com/jnicklas/capybara/commit/a00435d63085ac2e74a0f64e7b7dedc0f7252ea9 You can can now specify a custom header when using a custom Capybara driver. See http://automagical.posterous.com/creating-a-custom-capybara-driver for code examples.

Cucumber and Capybara, clicking a non-link or button element

You can click on an element via Capybara::Element.click. I add the following for this in my web_steps.rb to click on divs. When /^(?:|I )click within “([^”]*)”$/ do |selector| find(selector).click end There is also Element.trigger(‘mouseover’) which appears to enable hover albeit not working with Selenium. It is also very likely you will need to decorate your … Read more

Ruby on Rails: Cucumber: how do I Rake a single feature?

The correct way is to run it using the cucumber executable if you’re using Rails 2, or bundle exec cucumber if you’re using Rails 3 (and thus Bundler). To run a specific feature: [command] features/signing_in.feature To run a specific scenario from that feature: [command] features/signing_in.feature:6 The line number can be any line inside that feature, … Read more

Cucumber vs Capybara

Capybara is a tool that interacts with a website the way a human would (like visiting a url, clicking a link, typing text into a form and submitting it). It is used to emulate a user’s flow through a website. With Capybara you can write something like this: describe “the signup process”, :type => :feature … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)