I am trying to automate the login process on reddit while staying on the page for the post. After selenium clicks the login button in the corner, the login/signup window pops up. However when I write driver.pagesource to a new file, nothing from the login/signup window is there?
The window is in an iframe but selenium was unable to find it when i tried driver.switch_to.frame('Login or create a Reddit Account')

The username and password fields are under the first shreddit-async-loader where the two inspect windows start to differ. How can I access this part of the site? When I print driver.pagesources, after clicking the button, it prints the old one. Is there some way to update the driver or dive deeper in to the source?