How can I find dynamic elements in Gerrit's changeset page

68 views Asked by At

I want to write a Greasemonkey script to adapt some small detail of Gerrit to our team's workflow.

The problem is I cannot get the elements I'm after even in the Javascript console. I guess that's because most of it is built dynamically. If you do “View Page Source” there's almost nothing in there except loading of Javascript.

In the rendered page I cannot even find any interesting element with an id like e.g. the reply button:

document.getElementById("replyBtn")

What I'm really after is the “Resolved” checkboxes which are always on by default. I also tried XPath like

document.evaluate("//input", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE)
XPathResult { resultType: 6, invalidIteratorState: false, snapshotLength: 0 }

It says length 0 although I see one directly above the console!

How can I get to these elements that were not in the HTML file on disk but added later? Preferrably without adding a dependency on jQuery or similar.

screenshot of the page with my tries in the javascript console

0

There are 0 answers