Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Count tags in web page with webdriverio
browser.execute(
() => {
return Array.from(document.querySelectorAll("*")).map(e=>e.tagName.toLowerCase())
})
.reduce((a,b) => {a[b]=(a[b] || 0)+1; return a}, {})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment