There is a similar question out there (an older one in Python) but this one has to do with JS. Testing using Selenium in a NodeJS, Mocha environment. What I'd like to do is click on a Bootstrap dropdown and check the HTML to look for changes. I've tried the following:
test.it('should click on all header links',
function() {
var elem = driver.findElement(By.id('Profile'));
console.log(elem.getAttribute('innerHTML'));
console.log(elem.getInnerHtml());
});
Both calls return the same thing.
{ then: [Function: then],
cancel: [Function: cancel],
isPending: [Function: isPending] }
I plan to feed the HTML into cheerio so i can check for structure changes. Appreciate any help on this.