Writing the following command in the console:
document.querySelectorAll("[type='checkbox']")
Returns:
NodeList(12) [input.jss719, input.jss719, input.jss719, input.jss719, input.jss719, input.jss719, input.jss719, input.jss719, input.jss719, input.jss719, input.jss719, input.jss719]
This is exactly what I want to achieve in Codeceptjs, so I can later loop through the elements.
I've tried creating custom functions like:
allSelector: function (selector) {
return Array.from.document.querySelectorAll(selector)
}
However, I keep getting null
when console logging:
let checkboxes = (await I.grabAttributeFrom("[type='checkbox']"))
console.log(checkboxes)