Forum Discussion
chicks
14 years agoRegular Contributor
Since it was just image comparison, I tried to record a script and use a regions checkpoint. This was when I got the truncation error on the images.
Then I started using
var snapshot = locationList_Mapview_canvas().Picture();
Regions.all_on_50_miles.Check(snapshot,false, false, 91, 10);
I used update to get the 'all_on_50_miles' image correct the first time.
This avoided the truncation error, but failed the comparison if the google maps view canvas was not centered perfectly.
Sometimes, I could see the .Picture line causing the screen to 'jump' or move during the picture capture. When it jumped, the image comparison consistently failed, though sometimes it failed without a perceptible screen movement.
After much effort was expended using trial and error to try and get the screen centered properly, and some tinkering with the pixel and color tolerance, I seemed to be getting consistent results.
However when I moved over to my automated test box, which is using IE8, the image comparison failed. I can see that the image is shifted slightly.
I'm guessing image update does not work in Test Execute?
Then I started using
var snapshot = locationList_Mapview_canvas().Picture();
Regions.all_on_50_miles.Check(snapshot,false, false, 91, 10);
I used update to get the 'all_on_50_miles' image correct the first time.
This avoided the truncation error, but failed the comparison if the google maps view canvas was not centered perfectly.
Sometimes, I could see the .Picture line causing the screen to 'jump' or move during the picture capture. When it jumped, the image comparison consistently failed, though sometimes it failed without a perceptible screen movement.
After much effort was expended using trial and error to try and get the screen centered properly, and some tinkering with the pixel and color tolerance, I seemed to be getting consistent results.
However when I moved over to my automated test box, which is using IE8, the image comparison failed. I can see that the image is shifted slightly.
I'm guessing image update does not work in Test Execute?