func (s *Selection) Elements() ([]*api.Element, error) {
	elements, err := s.elements.Get()
	if err != nil {
		return nil, err
	}
	apiElements := []*api.Element{}
	for _, selectedElement := range elements {
		apiElements = append(apiElements, selectedElement.(*api.Element))
	}
	return apiElements, nil
}
Elements returns a []*api.Element that can be used to send direct commands
to WebDriver elements. See: https://code.google.com/p/selenium/wiki/JsonWireProtocol
package agouti
import (
	"fmt"
	"github.com/sclevine/agouti/api"
	"github.com/sclevine/agouti/internal/element"
	"github.com/sclevine/agouti/internal/target"
)
type Selection struct {
	selectable
	elements elementRepository
}
type elementRepository interface {
	Get() ([]element.Element, error)
	GetAtLeastOne() ([]element.Element, error)
	GetExactlyOne() (element.Element, error)
}
func newSelection(session apiSession, selectors target.Selectors) *Selection {
	return &Selection{
		selectable{session, selectors},
		&element.Repository{
			Client:    session,
			Selectors: selectors,
		},
	}
}
func (s *Selection) String() string {
	return fmt.Sprintf("selection '%s'", s.selectors)
}