Created
September 18, 2016 02:30
-
-
Save executeautomation/23512f1f8f392832ab31b690484d1375 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BoDi; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Firefox; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using TechTalk.SpecFlow; | |
namespace SpecflowParallelTest | |
{ | |
[Binding] | |
public class Hooks | |
{ | |
private readonly IObjectContainer _objectContainer; | |
private IWebDriver _driver; | |
public Hooks(IObjectContainer objectContainer) | |
{ | |
_objectContainer = objectContainer; | |
} | |
[BeforeScenario] | |
public void Initialize() | |
{ | |
_driver = new FirefoxDriver(); | |
_objectContainer.RegisterInstanceAs<IWebDriver>(_driver); | |
} | |
[AfterScenario] | |
public void CleanUp() | |
{ | |
_driver.Quit(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This file is part of source code from https://github.com/executeautomation/SpecflowSeleniumParallel/blob/master/SpecflowParallelTest/Hooks.cs