-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathPlaybackSteps.cs
More file actions
42 lines (38 loc) · 1004 Bytes
/
PlaybackSteps.cs
File metadata and controls
42 lines (38 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// <copyright file="PlaybackSteps.cs" company="">
// Copyright © 2013 Dan Piessens All rights reserved.
// </copyright>
namespace SpecBind.CodedUI
{
using Microsoft.VisualStudio.TestTools.UITesting;
using TechTalk.SpecFlow;
/// <summary>
/// Playback Steps.
/// </summary>
[Binding]
public class PlaybackSteps
{
/// <summary>
/// Runs before executing each scenario.
/// </summary>
[BeforeScenario]
public void Before()
{
if (!Playback.IsInitialized)
{
Playback.Initialize();
}
Playback.PlaybackSettings.LoggerOverrideState = HtmlLoggerState.AllActionSnapshot;
}
/// <summary>
/// Runs after executing each scenario.
/// </summary>
[AfterScenario]
public void After()
{
if (Playback.IsInitialized)
{
Playback.Cleanup();
}
}
}
}