Linkedin search result
so on the search page i want to only select the buttons with connect on them. the if statement doesnt seem to check if connect is the text content.
var buttons = document.getElementsByClassName(
'artdeco-button artdeco-button--2 artdeco-button--secondary ember-view'
)
for (var i = 0; i < buttons.length; i++) {
console.log(buttons[i].textContent)
if (buttons[i].textContent == 'Connect') {
console.log(i)
}
}
result
Shouldnt the connect have an corresponding i?