I've noticed some strange behavior where elements that are present in the view are not being located by nightwatch. In order to see exactly what is visible, I'd like to iterate through the view that nightwatch has opened, and get a list of every element that it can locate, and get the relevant information from that result about what those elements are. I've been able to 'find' all the elements with the following:
browser.elements('css selector', 'div', function (elements) {
elements.value.forEach(function(element){
console.log('result', element)
})
})
The catch is that the result is a series of these: { ELEMENT: '0.9107972990792419-3' }
How do I get the class
, and all the other relevant information about the element from the nightwatch ELEMENT
?
Thanks!