Last active
August 29, 2015 13:55
-
-
Save asciidisco/8731237 to your computer and use it in GitHub Desktop.
Check existence of attributes with Dalek
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
test.execute(function () { | |
var nl = document.querySelectorAll(".menubar a[href]"); | |
var as = Array.prototype.slice.call(nl); | |
as.foreach(function (el) { | |
var attr = el.getAttribute('data-tracking-id'); | |
this.assert.ok((attr !== null), 'Attribute exists for:' + el.outerHTML); | |
}.bind(this)) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment