Refactored things a bit. Now you can configure by passing a block, and added logic to start the selenium server if it is set to localhost