When you want to test how an web-application reacts in a specific resolution, you can set up a specific...

Capybara has a global option (Capybara.ignore_hidden_elements) that determines whether Capybara sees or ignores hidden elements.

stackoverflow.com

In some older Capybara versions (e.g. 0.3.9), we're getting lots of deprecations warnings: Selenium::WebDriver::Element#select is deprecated...

When you regularly make use of Cucumber's "show me the page" step (or let pages pop up as errors...

This is surprisingly difficult when there is a with the same text on the page, but you really want to...

makandra dev

The handy method has_select?(field, :selected => text) does not behave as expected with Cucumber 0.10.2, Capybara 0.4.1.2 and Selenium...

Tooltips that are delivered through HTML attributes are encoded. Decode entities before checking for their presence. Capybara: Then /^there should...

github.com

Some helpers for poking around at your Capybara driven browser's cookies in integration tests. Supports Capybara's bundled drivers...

The step definition below lets you say: Then I should see a field "Password" But I should not see a...

If you get an error like this: Unable to launch /home/bruce/Projects/myproject/tmp/capybara/capybara-201110311210111407691101.html ... update your launchy gem. It failed for us in...

stackoverflow.com

The solution in this card is based on a stack overflow post by Leventix. If you need to make request...

Capybara will match elements outside of a page's tag. For example, the step definitions below match nodes in a...

You can use the step definition below to say this: Then the "Last name" field should have an error

We are consistently having trouble with selenium-webdriver > 2.5.0 where whenever we try to select an option from a Capybara...

When you don't know which options are available, but need to have an option selected, use this step.

stackoverflow.com

These methods are available to you: page.driver.browser.switch_to.alert.accept page.driver.browser.switch_to.alert.dismiss page.driver.browser.switch_to.alert.text # the confirmation text Spreewald gives you steps like these:

Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...

makandra dev

The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node...

When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...

robots.thoughtbot.com

I think this pattern is really useful not just for upgrading suites from Webrat, but really anywhere you have an...

Note: While the solution in this card should still work, we prefer another solution now: Hide your Selenium browser window...

API breakage ahoy. You need to either upgrade your Capybara or downgrade your selenium-webdriver gem. Alternatively, this could solve...

These steps are now part of Spreewald. Since Capybara 0.4.1 a within scope will only look at the first element...

The step definition below allows you to write: Then I should see a link labeled "Foo" But I should not...