Avoiding false positives with Protractor and Javascript