func (t *Test) Extract() map[string]string {
	data := make(map[string]string)
	t.Result.Extractions = make(map[string]Extraction)
	for varname, ex := range t.DataExtraction {
		value, err := ex.Extract(t)
		if err != nil {
			t.Result.Extractions[varname] = Extraction{Error: err}
			t.errorf("Problems extracting %q in %q: %s",
				varname, t.Name, err)
			continue
		}
		data[varname] = value
		t.Result.Extractions[varname] = Extraction{Value: value}
	}
	return data
}
Extract all values defined by DataExtraction from the successfully executed
Test t.
package ht
import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"reflect"
	"regexp"
	"strings"
	"time"
	"github.com/andybalholm/cascadia"
	"github.com/robertkrimen/otto"
	"github.com/vdobler/ht/populate"
	"golang.org/x/net/html"
)
type Extractor interface {
	Extract(t *Test) (string, error)
}