I want to capture desktop screenshot frequently during my automation execution and save it in a particular folder. My code is all working except the one to capture the desktop which is the below.
Image img = Microsoft.VisualStudio.TestTools.UITesting.UITestControl.Desktop.CaptureImage();
The first code is not working even though I have added the proper reference. It says
Could not load file or assembly 'Microsoft.VisualStudio.TestTools.UITest.Playback, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Is there a way to solve this? Or can you provide me an alternate code just to capture the full desktop?
Thanks in advance
Ask general questions here.
2 posts • Page 1 of 1