Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...

github.com

When Capybara locates elements in the DOM, by default it allows only accessing visible elements -- when you are using a...

makandra dev
stackoverflow.com

Modern versions of Capybara include a finder method #ancestor which allows you to find a parental element using CSS or...

A flaky test is a test that is often green, but sometimes red. It may only fail on some PCs...

Sometimes a link or input field has no visible label. E.g. a text field with a magnifying glass icon 🔎 and...

The RSpec matcher tests if two HTML fragments are equivalent. Equivalency means: Whitespace is ignored Types of attribute quotes are...

It seems like changing the HTTP_ACCEPT_LANGUAGE is not possible for a headless chrome. On Ubuntu the headless Chrome...

peter.sh

An extensive list of command line options when booting Chrome. This is useful for building a Capybara driver with custom...

In case your integration tests crash with a message like below, try to upgrade Capybara to a newer version (3.35.3...

Capybara added a deprecation warning in version 3.35.3 (version from 2019) that shows up if your selector is not of...

makandra dev

6.0.0 2021-06-02 Compatible changes geordi commit will continue even if one of the given projects is inaccessible. It...

We recently noticed issues with Chrome 75+ when having the w3c option enabled within the Selenium webdriver. It looks like...

When testing JavaScript functionality in Selenium (E2E), you may need to access a class or function inside of a evaluate...

We prefer to run our end-to-end tests with headless Chrome. While it's a very stable solution overall...

When your Rails application server raises error, Capybara will fail your test when it clears the session after the last...

Browsers blocks abusable JavaScript API calls until the user has interacted with the document. Examples would be opening new tab...

makandra dev
github.com

capybara-lockstep can help you with flaky end-to-end tests: This Ruby gem synchronizes Capybara commands with client-side...

bundle outdated [--filter-major|--filter-minor|--filter-patch] Example output for bundle outdated --filter-major Other examples

When testing with Cucumber / Caypbara, iframes are ignored, so you can't interact with them. To interact with your iframe...

Headless Chrome is a way to run the Chrome browser without a visible window. Configuring Capybara Configure the Capybara driver...

tl;dr Don't forget require 'English' if you use a named global such as $LAST_MATCH_INFO. Otherwise this...

To find an input with the type hidden, you need to specify the type hidden: find_field('Some label', type...

Imagine you want to write a cucumber test for a user-to-user chat. To do this, you need the...

Sometimes, you might have duplicate links on a page. Trying to click those links will by default cause Capybara to...