So selenium deprecated getInnerHtml() and getOutterHtml() and in 3.0 beta they plan on completely removing the functions. I have test that check markup. So what should we be using in their place? Why are they being removed? I use protractor/webdriver.js with selenium.
.getOuterHTML() methods can be replaced with
.getAttribute("outerHTML") respectively and, I assume, this is the reason they are deprecated. There is no point in having special methods for these cases while it can be easily retrieved through a "get attribute" call.
getOuterHTML() are not a part of the Protractor public API anymore as well.
FYI, here are the
getOuterHTML() method implementations - basically retrieving the
outerHTML attribute values (though for "outerHTML" there is a special case handling - when there is no
outerHTML attribute available).
By the way, if you want to enforce not having
getOuterHTML() in your test codebase, you can use
no-get-inner-outer-html ESLint rule from
eslint-plugin-protractor plugin (shameless self-promotion).