A JavaScript error in an E2E test with Selenium will not cause your test to fail. This may cause you...
The basic idea is pretty simple: an element's height is accessible via the offsetHeight property, its drawn height via...
Single step and slow motion for Cucumber scenarios can come in handy, especially in @javascript scenarios. # features/support/examiners.rb AfterStep('@slow_motion...
When you cannot make Selenium trigger events you rely on (e.g. a "change" event when filling in a form field...
TL;DR Debugging problems with javascript errors in cucumber tests is sometimes easier in the browser. Run the test, stop...
Copy the attached file to features/support. This gets you a convenience method: Capybara.javascript_test? Is true for Selenium, capybara-webkit...
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:
Cucumber scenarios that are tagged with @javascript so they run with Selenium are very slow. You might not want to...
When cucumber encounters a failing step in a @javascript feature, the selenium browser window instantly closes. Sometimes you do not...
You might not know that Rails disables CSRF protection in tests. This means that if you accidentally forget to send...
Seems like there's no way to do it in Capybara, unfortunately. But if you're running your tests with...
Middleman is a static page generator that brings many of the goodies that Rails developers are used to.
Download buttons can be difficult to test, especially with Selenium. Depending on browser, user settings and response headers, one of...
Detecting if a Javascript is running under Selenium WebDriver is super-painful. It's much easier to detect the current...
Specify these gem versions in your Gemfile: gem 'cucumber', '~> 1.3.0' gem 'cucumber-rails', '= 0.3.2' # max version for Rails 2
When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...
I had to deal with JavaScript Undefined Error while accessing a specific CKEditor instance to fill in text. Ensure everything...
Applications often show or hide elements based on viewport dimensions, or may have components that behave differently (like mobile vs...
geordi, our collection of awesome shell scripts, has been extended by three scripts to help you call RSpec or Cucumber...
Capybara sets up some tags for you to use in Cucumber. Often you’ll want to run only some scenarios...
Same requests are recorded only once in vcr. Replaying a test fails, if you trigger the same request multiple times...
Testing file download links in an end-to-end test can be painful, especially with Selenium. The attached download_helpers.rb provides...
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: