stackoverflow.com

This works in all relevant browsers: document.activeElement You can use this in your Selenium steps, for example, to assert that...

makandra dev

Basic error pages To add a few basic styles to the default error pages in Rails, just edit the default...

Capybara uses www.example.com as the default hostname when making requests. If your application does something specific on certain hostnames and...

ActiveRecord has a feature called counter caching where the containing record in a has_many relationship caches the...

Cards can now be flagged as "Repeating". Every Wednesday, some of these cards will be moved back to the top...

Selenium cannot reliably control a browser when its window is not in focus, or when you accidentally interact with the...

odyniec.net

imgAreaSelect is a jQuery plugin for selecting a rectangular area of an image. It allows web developers to easily implement...

makandra dev
github.com

The gem author Jonas Nicklas highlights in a Google Groups post that the release is not backwards compatible to 1...

Capybara gives you two different methods for executing Javascript: page.evaluate_script("$('input').focus()") page.execute_script("$('input').focus()")

thegleebox.com

gleeBox is an experimental project that takes a keyboard-centric approach to navigating the web. It provides alternatives to actions...

Generally, Selenium tests use the browser to interact with the page. If it's unavailable, a timeout error is...

If you're using the Capybara webdriver, steps sometimes fail because the browser hasn't finished loading the next page...

Around will not happen until after a feature's Background has been processed. Use Before and After to avoid that...

Geordi now supports our solution for running Selenium tests without having Firefox or Chrome windows popping up all over your...

Give your iframe a name attribute (i.e. ) and then simply use When I press "Foo" in the iframe "myframe"

makandra dev

This describes how to migrate an existing cucumber test suite to Spreewald. Add the gem Include spreewald into your cucumber...

Cucumber_rails' old-school web-steps have been deprecated for a while, urging developers to write high-level step definitions...

Ever wanted autocompletion for paths from paths.rb in Cucumber? This card lets you write your steps like this:

The step definition below allows you to write: Then I should see an HTML redirect to "http://www.makandracards.com" in the...

makandra dev

If a customer calls and tells you that she cannot see some content of her website beware of the following...

A print stylesheet is easy to create. Choose a font suited for paper, hide some elements, done. Unfortunately print stylesheets...

makandra dev

This article describes how to reset MySQL's or MariaDB's root password on your workstation. It's meant for...

This works in modern RSpecs (RSpec >= 2.x) and Cucumbers: rspec spec/models/node_spec.rb:294:322 cucumber features/nodes.feature:543:563:579

Sometimes you need to look at the filter chain in specs. You can do it like that on Rails 2...