RSpec allows defining methods inside describe/context blocks which will only exist inside them. However, classes (or any constants, for that...
Here is some JavaScript code that allows you to click the screen and get the clicked element's text contents...
I frequently find myself needing a combination of group_by, count and sort for quick statistics. Here's a method...
before(:all) runs the block once before all of the examples. before(:each) runs the block once before each...
Scope is all about where something is visible. It’s all about what (variables, constants, methods) is available to you...
First, go to the webinterface of your phone. Choose Software Update in the navigation on the left. Next, you have...
Shoulda Matchers don't provide canditional validations (validations with if: option). Here is how to write tests for the condition...
Nowadays it is fairly easy to intercept and modify mails globally before they are sent. All you have to do...
ChromeDriver clicking works by simulating a mouse click in the middle of the element's first client rect (or bounding...
Dump this method into your Ruby console to quickly print data in columns. This is helpful for e.g. comparing attributes...
This card compares patterns to store trees in a relation database like MySQL or PostgreSQL. Implementation examples are for the...
RubyMine provides a visual tool for resolving merge conflicts locally. Follow Git > Resolve Conflicts in the context menu to open...
Imagine the following HTML structure, where the scrolling container has overflow-y: scroll: +--scrolling container+-+ | | | +-child element+----+ | | | ++iframe++ | | | | | | | | | | | | | | +-----------------------+ | | | | <-- actually cut...
Sometimes you want/have to send specific http(s) requests. You can do that easy with curl or just write the...
ImageMagick has a command line tool called identify which can read image metadata: >identify -verbose DSC00136.JPG Image: DSC00136.JPG Format: JPEG...
iOS Safari tries to be helpful and enlarges some(!) texts when you turn to landscape mode. In precise CSS building...
Barby is a great Ruby gem to generate barcodes of all different sorts. It includes support for QR codes via...
Using the dialog command you can launch ASCII-art dialogs from your shell scripts. Check out man dialog for a...
Line-height and vertical-align are simple CSS properties. So simple that most of us are convinced to fully understand...
Below is a list of some VIM settings I find useful. You can add them to your .vimrc. source $VIMRUNTIME/mswin.vim...
window.getSelection().toString(); Browser support: IE9+, Android 4.3+, Safari 5+
There seems to be a nasty bug in Chrome 56 when testing with Selenium and Capybara: Slashes are not written...
We generally use multiple application servers (at least two) and you have to search on all of them if you...
Collection of useful tools in the Chrome JavaScript console. Make the whole page editable This is not special to Chrome...