Question: Have just been looking at some old exam papers and came across a question I cannot figure out :

Suppose you have a `2Mbit/s` link alone a wire that is 240,000 miles away. The data travels at the speed of light which is 186,000 miles per second. How long does it take to transfer a `30kb` file from the moon to the earth ? To transfer the file, an initial 2\*Round Trip Time of handshaking must occur.

How can I solve this?

> 
> 240,000/186,000 = 1.29...secs \* 2 =
>  2.58secs = 2 \* Round Trip Time.
> 
> 
> 2MB = 2000Kb.
> 
> 
> 30/2000 = .015secs + 2.58 = 2.595secs.
> 
> 
> 

Is this anywhere close? I have a feeling I should factor in the time it takes to transfer the 30Kb somehow, but I am unsure where to do this.

Answer: 
So you want to check that the text in the image with selenium.
You will need to grab the url of the image, download that image, and put it through an OCR program.

So short answer, not with selenium
Actually I threat this here: 

1. Shows you how you can compare 2 images and get a differences image or a gif animation with the overlapping of the first 2:

<http://testautomationexperiences.com/detect-layout-issues-using-file-hashes-and-imagemagick-for-compare/> 

2. Do it in Selenium by using im4java and imagemagick; also the hash checking is the first step in verification:

<http://testautomationexperiences.com/detect-layout-issues-using-file-hashes-and-imagemagick-for-compare-coding-in-java/>

I hope it helps, even is not OCR.

For OCR, you need a library (created by you or an existing one) which you call from selenium.

Good luck,
Claudiu Adam

<http://testautomationexperiences.com/>