Render series of responses in selenium webdriver
<p>I want to collect a series of responses when navigating a website, and afterwards "recreate" the process <strong>using the responses</strong>.</p>

<p>From an <a href="http://stackoverflow.com/questions/36785588/render-http-responsehtml-content-in-selenium-webdriverbrowser">other thread</a> I found this solution to render HTML:</p>

<pre><code>content = requests.get("http://stackoverflow.com/").content

driver = webdriver.Chrome()
driver.get("data:text/html;charset=utf-8," + content)
</code></pre>

<p>Unfortunately, when I try this (using Firefox instead of Chrome), the content is simply put into the browser address bar.</p>

<p>How can I render a series of responses, including for example XHR-responses with selenium webdriver?</p>

<p>I found a possible solution, or rather workaround. When saving requests (urls) and responses in a dictionary, you can set up a server that answers each request with its resprective pre-recorded response.</p>

javascript python selenium selenium-webdriver