We need a better solution/implementation for handling the DOM manipulation hooks. They rely on primitives/low-level python API which is bad and extremely hacky with the new way of generating the report. See #611