This error occurs when you already have a database.yml which defines the database for the cucumber environment instead of test...

It is good programming practice to Don't Repeat Yourself (or DRY). In Ruby on Rails we keep our code...

Geordi 0.16+ supports running selenium tests with project-specific firefox versions. Just update the gem. It will still default to...

The default configuration of Rails disables CSRF protection in tests. If you accidentally forget to send the CSRF token for...

Copy the attached file to features/support. This gets you a convenience method: Capybara.javascript_test? Is true for Selenium, capybara-webkit...

Using text-transform: uppercase - especially on form labels - can cause you serious headaches in Selenium tests. Sometimes the web driver...

rubydoc.info

Preface: Normally, you would not need this in integrations tests (probably that's why it is so hard to achieve...

Simply give the select helper an option :disabled, passing either a single value or an array. You need to specify...

For Capybara, use this step: Then /^"([^"]*)" should be a disabled option for "([^"]*)"(?: within "([^\"]*)")?$/ do |value, field, selector| with_scope(selector...

makandracards.com

So you're hunting down a regression (or just a bug) and want to use git bisect to find out...

I recently encountered the error above when I was running selenium tests. Thanks to a post on stackoverflow I found...

theprogrammingbutler.com

Similar to closing an opened browser window, spreewald now supports the I switch to the new browser tab step.

This card shows how to upgrade a Rails 2 application from Rails 2.3.8 through every single patch level up to...

Capybara drivers will usually delete all cookies after each scenario. If you need to lose cookie data in the middle...

Sometimes you need a piece of code to do something different for specs than for features. If you don't...

Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...

The User-Agent HTTP header identifies the client and is sent by "regular" browsers, search engine crawlers, or other web...

Spreewald's patiently repeats the given block again and again until it either passes or times out.

When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...

Unfortunately, Capybara does not offer a switch to disable cookies in your test browser. However, you can work around that...

To set a cookie in your test browser for cucumber tests, you need to know which driver you are using...

The following code doesn't work like expected: page.find(css_selector).find(other_css_selector) The second .find will search...

If you open a pop-up window [1] in your Selenium tests and you want to close it, you can...

If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...