Helper functions for testing with protractor