Among a large number of frames to find the desired input and write a value to it?

Actually, there is a site with lots of frames, one of them has #editor.
I need a tools JS (user scripts) to write a value and submit the form.
How to get to the right frame?
Maybe there are add-ons to the browser to build the road? Type easier)
March 23rd 20 at 18:39
1 answer
March 23rd 20 at 18:41
const iFrames = document.querySelectorAll('iframe');

iFrames.forEach(iframe => {
 const _document = iframe.contentWindow.document;

 if (let editor = _document.querySelector('#editor')) {

Find more questions by tags JavaScript