I am trying to run some automatic scripts on a webpage with selenium and python, but the problem I'm having is that the webpage is loaded using document.write()
.
I have to find some elements, but they are not shown because when I view the source, it is shown as document.write(A lot of JS) instead of the html.
How can I do it so that I can view the HTML source code? I know there is the function driver.execute_script()
, but I have to specify the script to run, and I don't think it will work.
The page is correctly rendered, only problem is the source cannot be parsed.