This is a migrated thread and some comments may be shown as answers.

Snapshots of the application under test

6 Answers 187 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mercedes
Top achievements
Rank 1
Mercedes asked on 05 Feb 2013, 11:40 PM
How can i get snapshots of the web application during the test execution?

6 Answers, 1 is accepted

Sort by
0
Accepted
Steven
Top achievements
Rank 1
answered on 07 Feb 2013, 08:02 PM
With the test open, choose Browser Capture (or Desktop Capture, if you'd prefer) from the More... (green circle) button in the tool ribbon's Add section. See attached screenshot. 

The difficulty I had was then in actually locating the screenshot; on my system they're put into C:\WebAiiLog rather than  C:\Users\[username]\Documents\Test Studio Projects\[project name]\Results as I had expected. 




0
Mercedes
Top achievements
Rank 1
answered on 08 Feb 2013, 02:19 PM
Perfect !!!

Thank you,
Nithin
0
Mercedes
Top achievements
Rank 1
answered on 21 Mar 2013, 03:31 PM
I was able to modify the location to capture the screenshots to a desired location. All the screenshots are stored in the same location. I would like to create a new folder for every Iteration based on the iteration number. Can that be done?
0
Accepted
Mario
Telerik team
answered on 26 Mar 2013, 06:21 PM
Hello Brian,

Thank you for your question.

We can certainly check for existing folders and create new ones with a line of code:

System.IO.Directory.Exists(folderName);

System.IO.Directory.CreateDirectory(folderName);

In order to apply this to create a new folder based on iteration number (eg. in a data-driven test) in a script step, we can use a while loop to check/create a unique folder (with name '1', '2', '3' ...) for each image:

int i = 1;       
string folderName = "c:\\MySnapshots\\" + i.ToString();
while(System.IO.Directory.Exists(folderName))
{
    i++;
    folderName = "c:\\MySnapshots\\" + i.ToString();
}
System.IO.Directory.CreateDirectory(folderName);
Log.CaptureBrowser(ActiveBrowser, folderName + "\\snapshot");

Let me know whether my suggestion helps or if you have any additional questions.

Kind regards,
Mario
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Kate
Top achievements
Rank 1
answered on 17 Sep 2014, 03:20 AM
To do that, you can press "Alt"+"PrtScn" keys to screenshot the web application window under test. Or you can make use of simple yet rich-featured screenshot tools like Free Screenshot Capture, PicPick, Jing and others.
0
Boyan Boev
Telerik team
answered on 19 Sep 2014, 12:42 PM
Hello Kate,

Thank you for you input. 

This is an approach where you use a third party software for making screen shots.

As Steven Vore wrote we have a build-in functionality for taking snapshots in Test Studio automatically during the test execution.

Thank you for helping other we really appreciate it.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Mercedes
Top achievements
Rank 1
Answers by
Steven
Top achievements
Rank 1
Mercedes
Top achievements
Rank 1
Mario
Telerik team
Kate
Top achievements
Rank 1
Boyan Boev
Telerik team
Share this question
or