capture PhantomJS and run the tests