Selenium get rendered php captcha image
<p>I trying to parse web page that has captcha. Captcha is generated by PHP:</p>

<pre><code>&lt;img src="/captcha.php" border="0" align="absmiddle"&gt;
</code></pre>

<p>What i do:</p>

<pre><code>   self.driver = webdriver.Chrome()
   img = self.driver.find_element_by_xpath('//table/tbody/tr/td/img')
   scr = img.get_attribute('src')
</code></pre>

<p>but it contains captcha.php  and i expecting to see base64.</p>

<p>Is there any way to get that image return by php script ?</p>

<p>from <a href="http://stackoverflow.com/questions/17361742/download-image-with-selenium-python" title="this answer">this answer</a> you can download the image:</p>

<pre><code># download the image
urllib.urlretrieve(src, "captcha.png")
</code></pre>

python selenium