Let's build a system for performing functional tests on web applications, using Selenium and PhantomJS. The resulting system will allow us to write easy test scenarios in JavaScript, and test those scenarios both in real browsers and a headless simulator. Choosing Components The obvious downside to Selenium is that it requires a full graphical desktop for any and all tests. To begin, we have to ch