We are doing Test Automation. We need to locate elements under kendo-grid-columnlist, and given a Text Input (Product Type) in Span, locate its co
kendo-grid-columnlist
Span
You can do the following,
let spans = document.querySelectorAll('kendo-grid-columnlist .k-checkbox-label'); let myElement = null; spans.forEach(item => { if(item.innerText === 'Product Type') { myElement = item.parentNode.firstElementChild; } }); console.log(myElement);