Add casperJS tests
Fix focus issue