I've been looking at how to use selenium web driver to take screenshot of a web page. The result is looking quite promising. The only problem I have is from all the examples I could find (e.g. Take a screenshot with Selenium WebDriver), it only lets you navigate to a web page, and then take a snapshot which only gives you the initial state of the page. However, the web pages I need to take screenshot of has many JS content and user interactions. Is it possible to set the current state of a web page in selenium?
For example, a user logs in my app, and clicks a few buttons, tabs and opens a modal dialog. How do I take a screenshot of the page with all the user interactions the user has performed?
What I can think of is sending the entire HTML document to server and generate a static html page, and then let webdirver take a screenshot of the static html page.
Thx in advance.