I am trying to save an captured image from my application onto a disk. e.g in C:\\images
(I am not using stores for this)
Any idea on how to do this?
Yep that worked ..thanks.
Now I am facing some weired problem, here it is.
I am trying to capture the images one by one and output it to the file. But most of the time it outputs blank images to the file.
Any clue why this is happening?
Are the images blank if you use Sys.Desktop.Picture(Obj.ScreenTop,Obj.ScreenLeft,O bj.Width,Obj.Height)? I have seen where direct draw images can be blank from the object. Also, which version of TC?
I am using
OnscreenObj.Picture(ClientX, ClientY, OffsetX, OffsetY, Mouse)
This works perfectly when I am debugging through my for loop one by one,it outputs image w/o any problems.
But I dont know why it outputs blank images when i am running my test(i.e. w/o debug).
I am using TC 6.20
Not really, it might be possible that OnScreenObj is being redrawn when TC takes a picture since TC is running too fast in the loop for the application. What happens if you put a OnScreenObj.Refresh before the OnScreenObj.Picture?
Worked like a charm!
This has become flaky and codeindigo and I cannot track down why sometimes we get blank images and sometimes we get the correct object image. Any other ideas?
Software QA Engineer - Automation Lead
Most cases of this problem, I have seen is the TC takes it picture before the onscreen object is drawn. You could try a small delay before the picture and see it that helps.
You could also use a WaitChild or WaitItem (or whatever) before the picture snapshot to make sure that the object is fully loaded before you take the screen shot.
Automated Testing Evangelists
Definition expert - noun - Unknown drip under pressure