Added a hook to wait before doing the assertion for PhantomJS