I was experiencing a strange issue where if I had screen.debug() in my test, the following steps would behave differently. After some digging, I realized it was because the debug method actually modified the DOM. It appears to be from these lines where node is a reference to the actual DOM and an element is inserted.
Can the node be copied first so that the actual DOM isn't changed as a result of debugging?
I was experiencing a strange issue where if I had
screen.debug()
in my test, the following steps would behave differently. After some digging, I realized it was because the debug method actually modified the DOM. It appears to be from these lines wherenode
is a reference to the actual DOM and an element is inserted.Can the node be copied first so that the actual DOM isn't changed as a result of debugging?