I need to use a javascript user script (through GreasMonkey/TamperMonkey extensions or else) to change the default values of some input text boxes inside some iframe that is created dynamically in a web service.
Using the console window of chrome when the javascript context is at top I can access to the required element through something like this:
document.getElementsByTagName('iframe')[1].contentDocument.getElementsByTagName('iframe')[1].contentDocument.getElementById('txtCode1')
So now what can I do to have a generalized Greasemonkey code to access the input texts (that are dynamically created, not on the load of the page) and change the default values to the desired ones?