Reputation: 1771
I am testing web application which can help to extract text from image using Optical Character Recognition.
Steps for explanation is
Enter text to convert in Image using [Convert text to image] utility .
Now we have developed OCR app to extract this text from image.
I want to take save this image and pass it to OCR app which is web based applicaion.
So I want to know how to save this text image to drive
Example: http://www.textimg.net/
Upvotes: 1
Views: 1645
Reputation: 1482
I don't think there's an easy way using selenium webdriver, however, I think you can get the link of the image using webdriver, then use whatever language you're using to download the file, for example, if you're using ruby you can use the below code, it will create a new file called image.png and copy the image from url:
require 'open-uri'
open('image.png', 'wb') do |file|
file << open('http://www.textimg.net/textimages/2012/this-text-image-tool-is-so-cool-_502153c0c5fa7.png').read
end
Upvotes: 3