We need to spy a web based application, but it uses a shadow DOM. Therefor we can't use the Browser spy mode.
Using the UI spy mode might seem like an option, but this method is considerabely slower.
I've read on the forum the method of injecting Javascript, but this option doesn't work in our case.
We have investigated the issue further and found out that a small change to the Chrome Browser extension could fix the problem.
There are two following elements in the source code of the Chrome extension which need to be changed:
· getHtmlSource.js - with case Node.ELEMENT_NODE the outerHTML is called.
· The outer HTML consists of only the 'regular' dom-elements, but not the shadow dom-elements. Could this be adjusted so that the shadow dom elements are also being serialized?
·
· main.js - in several places the getElement functions of document are used like 'getElementByTagName' etc. These functions only scan the regular dom; could they be replaced by functions that also scan the shadow-dom?