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

Capture Browser from Test Studio

3 Answers 203 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Tory
Top achievements
Rank 1
Tory asked on 27 Mar 2013, 12:58 PM
I read in some other thread that the Capture Browser step could only take screenshots if launched from Test View in Visual Studio. 

Is there any way to get the sceenshots to work from Test Studio? I'm exploring this product as a potential addition to the software our QA team uses. I'd prefer if they didn't have to use Visual Studio for this feature to work.

3 Answers, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 27 Mar 2013, 02:00 PM
I was able to do this in Test Studio using a Coded Step - from the 'Add' menu in a test pick 'Script Step', and replace the code with something like this (VB.net version):

<CodedStep("New Coded Step")> _
        Public Sub WebTest_CodedStep()
            Dim FileName = "Capture"
            Log.CaptureBrowser(ActiveBrowser, "C:\Logs\" + FileName)
        End Sub

For the screenshot to actually save to disk, I believe this has to be run from a test list.

[edit]
Better yet - on the 'Add' menu, if you click 'More', Browser Capture is one of the options.
0
Cody
Telerik team
answered on 29 Mar 2013, 09:02 PM
Hello Tory,

The problem you are thinking about is that when you Quick Execute a test, we deliberately disable the Capture Browser and Capture Desktop commands, this includes the those in code that Michael references. This behavior is exactly the same in both standalone Test Studio and our Visual Studio plug-in. The reasoning behind this is Quick Execution is intended only for test development. During test development you're not supposed to need Capture Browser/Desktop, at least in theory.

If you run your test via any other method e.g. command line, test list, scheduling server, VS test view, VS Test List Editor the captures will happen.

I hope this clarifies what is supposed to happen with our Capture feature.

Greetings,
Cody
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Tory
Top achievements
Rank 1
answered on 01 Apr 2013, 12:29 PM
That makes a lot of sense. Thank you very much for your response and for clearing that up. 
Tags
General Discussions
Asked by
Tory
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Cody
Telerik team
Tory
Top achievements
Rank 1
Share this question
or