If you try to listen to events on elements that are nested inside a , Firefox will stop event propagation once...
By default, browsers will not wrap text at syllable boundaries. Text is wrapped at word boundaries only. This card explains...
Checking if a JavaScript value is of a given type can be very confusing: There are two operators typeof and...
You are not using javascript tests The file is served from a public folder (not via controller) Problem description...
An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...
Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...
Here is some JavaScript code that allows you to click the screen and get the clicked element's text contents...
Sometimes modern Javascript projects get out of hand. A major culprit in this can be the messy handling of asynchronous...
You should prefer native promises to jQuery's Deferreds. Native promises are much faster than their jQuery equivalent. Native promises...
Native promises have no methods to inspect their state. You can use the promiseState function below to check whether a...
I often see the use of || to set a default value for a variable that might be nil, null or...
Capybara clears cookies before each scenario, but not other client-side data stores. If your app is using localStorage or...
Webpack is the future. We're using it in our latest Rails applications. For tests, we want to compile assets...
ChromeDriver clicking works by simulating a mouse click in the middle of the element's first client rect (or bounding...
Middleman is a static page generator that brings many of the goodies that Rails developers are used to.
RubyMine allows bookmarking lines of code. This is super-helpful when working on a complex problem. I've been using...
To move elements around we should be familiar with coordinates. Most JavaScript methods deal with one of two coordinate systems...
As web developers, we know how easy it is to end up with web page bloat. But loading a webpage...
window.getSelection().toString(); Browser support: IE9+, Android 4.3+, Safari 5+
You can easily have a JavaScript hash/object that returns a default value for unset keys/properties -- as long as you need...
There seems to be a nasty bug in Chrome 56 when testing with Selenium and Capybara: Slashes are not written...
Collection of useful tools in the Chrome JavaScript console. Make the whole page editable This is not special to Chrome...
TLDR: A function is hard to use when it sometimes returns a promise and sometimes throws an exception. When writing...
In general, you should not put a block element inside an inline element. So don't do this: text