Eventually it will maintain a cache of traversed paths, but for the time-being you can use the above to check a common path, and then go through leaf nodes. This will save you a full path traversal ...
Injected javascript into web page in order to execute an AB test: 2 markets, 5 js variations, [Created June 12, 2017 ] ...