-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathWebBrowser.cs
More file actions
37 lines (30 loc) · 744 Bytes
/
Copy pathWebBrowser.cs
File metadata and controls
37 lines (30 loc) · 744 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
#region
using TechTalk.SpecFlow;
using WatiN.Core;
#endregion
namespace GrouponDeals.AcceptanceTests
{
[Binding]
public class WebBrowser
{
public static Browser Current
{
get
{
if (!ScenarioContext.Current.ContainsKey("browser"))
{
ScenarioContext.Current["browser"] = new IE();
}
return (Browser) ScenarioContext.Current["browser"];
}
}
[AfterScenario]
public static void Close()
{
if (ScenarioContext.Current.ContainsKey("browser"))
{
Current.Close();
}
}
}
}