I'm trying to automate my course registration. Everything is running smoothly until I arrive at this Term Select page: element not found with doccument.getElementsByTagName('input')
The function document.getElementsByTagName('input')
returns 10 elements, none of which are the desired radio button. This perplexes me as the element is clearly loaded. document.getElementByID()
also doesn't work/ returns null.
Then, when I use chrome's "Select an element in the page to inspect it" tool, running the same function yields different results. element now found with doccument.getElementsByTagName('input')
Now the function returns 31 elements, including the desired radio input. document.getElementByID()
also works/ returns the desired element.
Upon further investigation, I see that many elements are not shown as descendants of document
before the devTool inspection.
document.child0.child1.child2 shows as having 1 descendent before inspection, then 12 after
Can anyone explain what's going on? How can I programmatically select this element after the page is loaded? I'm quite perplexed. Thanks!
EDIT: NVM. Today I learned iframes exist!