When ending a Selenium test Capybara resets the browser state by closing the tab, clearing cookies, localStorage, etc.

In order to navigate through the browser history. you can manipulate the window.history object via javascript like follows:

You need to update a lof gems. Make sure you don't have any version constraints in your...

TLDR: This card explains which threads and processes interact with each other when you run a Selenium test with Capybara...

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

makandracards.com

In Spreewald 1.10.4+, nested patiently blocks are now patient. Here is an example: patiently do outer_code patiently do

makandra dev

webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets...

You can use these step definitions: Then /^I should not see an error$/ do (200 .. 399).should include(page.status_code...

This is a problem when using Selenium with Firefox. We recommend using ChromeDriver for your Selenium tests. This setup allows...

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

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

The step definition below lets you write: When I click on "Foo" This is useful in Selenium features where the...

When running Selenium features with parallel_tests, some browser-server interaction might take longer than usual and the impatient Capybara...

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

Capybara clears cookies before each scenario, but not other client-side data stores. If your app is using localStorage or...

makandra dev

An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...

If you have content inside a page that is hidden by CSS, the following will work with Selenium, but not...

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

So your Cucumber feature sometimes dies with this exception: Modal Dialog Present (Selenium::WebDriver::Error::UnhandledAlertError) As a seasoned Selenium...

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

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

At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads...

Jasmine is a great way to unit test your JavaScript components without writing an expensive end-to-end test for...

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