/// <summary>
        /// When overridden in a derived class, this extracts information from both the request and response into the NetTestContext for the running test.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public virtual void Extract(Object sender, ExtractionEventArgs e)
        {
            HtmlAgilityPack.HtmlDocument document = new HtmlAgilityPack.HtmlDocument();
            document.LoadHtml(((WebTestRequest)e.WebTestItem).HttpResponseBody);
            document.OptionOutputAsXml = true;

            using (StringWriter writer = new StringWriter())
            {
                document.Save(writer);

                _document = XDocument.Parse(writer.GetStringBuilder().ToString());
            }
        }
 /// <summary>
 /// Fires Extract event.
 /// </summary>
 /// <param name="args"></param>
 protected virtual void OnExtract(ExtractionEventArgs args)
 {
     if (ExtractValues != null)
     {
         ExtractValues(this, args);
     }
 }