I'm try to use javascript to select/auto submit a form that is visible on the page, but it is not in the HTML source of the page. I can see the submit button but there is no iframe or HTML for it in the source of the page. The form was generated with javascript. Is it possible to select this "element" (the submit button) if it isn't in the page source code?
Yes. It's possible.
As soon as the button element is inserted into the DOM, you can select it.
The source code will only show you the code it received from the server, everything that javascript does it happens after that and it's added to the DOM dynamically.
You can look at the developer tools on your browser (F12) and you would be able to inspect the javascript-created elements.
With that information you can select the form using its ID, class name or even the form itself. Not sure what framework you're using, of if it's plain vanilla Javascript. If you let me know which one I can provide some examples.