title: Using ITestOutputHelper with Selenium, xUnit and C#
body: <p>I have recently switched a project from NUnit to xUnit so that ITestOutputHelper can be used to output to a log.</p>
  <p>The project is a fairly standard layout</p>
  <p>Feature Files-&gt;Step Classes-&gt;Page Classes-&gt;Help Classes. Include in the helper classes we have the hooks.class also. I am using the xUnit runner.</p>
  <p>So in my hooks class I have created this</p>
  <pre><code>private readonly ScenarioContext _scenarioContext;
  private ITestOutputHelper _testOutputHelper;
  
  public Hooks(ScenarioContext scenarioContext, ITestOutputHelper testOutputHelper)
  {
      _scenarioContext = scenarioContext;
      this._testOutputHelper = testOutputHelper;
  }
  
  public void WriteOutput(string theMessage)
  {
      _testOutputHelper.WriteLine(theMessage);
  }
  </code></pre>
  <p>Now my question is how do I access the WriteOutput function from the other classes?
  Or have I placed it in the wrong class?</p>