Created
December 18, 2014 15:54
-
-
Save khepin/4f215d641ab6044aca40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Le browser ne trigger aucun "blur" tant que la fenêtre du browser n'est pas active. | |
Ca peut se vérifier via un simple script dans ta console que tu laisses tourner avec un compteur de "blur" | |
Du coup on s'était résiliés à une fonction helper qui injecte du JS dans la page et | |
déclenche manuellement le "blur" | |
*/ | |
function blurElement(selector) { | |
element(by.css(selector)).sendKeys(protractor.Key.TAB); // Element cannot have focus. | |
var script = "$(':selector').trigger('blur');".replace(':selector', selector); | |
ptor.executeScript(script); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment