Last active
January 18, 2017 10:27
-
-
Save laurentperroteau/5c05302fbb88eb6c2a475971764726d1 to your computer and use it in GitHub Desktop.
Protractor exemple
This file contains hidden or 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
/** | |
* Get 2 level of selector using ".each" | |
*/ | |
return element | |
.all( | |
by.css('.selector') | |
) // return array of element | |
.each(function(parentElement, rowIndex) { | |
return parentElement | |
.all( | |
by.css('.sub-selector') | |
) | |
// ... |
This file contains hidden or 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
return element | |
.all( | |
by.css('selector') | |
) | |
.each(function(elem, index) { | |
// ... | |
}).then(function () { | |
return element(by.css('selector')).click().then(function () { | |
return element(by.css('selector')).click(); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment