selection

package
v2.0.0-...-b920a9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Element

type Element interface {
	ElementClient
	GetText() (string, error)
	GetAttribute(attribute string) (string, error)
	GetCSS(property string) (string, error)
	IsSelected() (bool, error)
	IsDisplayed() (bool, error)
	IsEnabled() (bool, error)
	IsEqualTo(other *api.Element) (bool, error)
	Click() error
	Clear() error
	Value(text string) error
	Submit() error
}

type ElementClient

type ElementClient interface {
	GetElement(selector api.Selector) (*api.Element, error)
	GetElements(selector api.Selector) ([]*api.Element, error)
}

type ElementRepository

type ElementRepository struct {
	Client ElementClient
}

func (*ElementRepository) Get

func (e *ElementRepository) Get(selectors []Selector) ([]Element, error)

func (*ElementRepository) GetAtLeastOne

func (e *ElementRepository) GetAtLeastOne(selectors []Selector) ([]Element, error)

func (*ElementRepository) GetExactlyOne

func (e *ElementRepository) GetExactlyOne(selectors []Selector) (Element, error)

type Selection

type Selection struct {
	Session interface {
		GetActiveElement() (*api.Element, error)
		DoubleClick() error
		MoveTo(element *api.Element, point api.Offset) error
		Frame(frame *api.Element) error
	}
	Elements interface {
		Get(selectors []Selector) ([]Element, error)
		GetAtLeastOne(selectors []Selector) ([]Element, error)
		GetExactlyOne(selectors []Selector) (Element, error)
	}
	// contains filtered or unexported fields
}

func NewSelection

func NewSelection(session *api.Session) *Selection

func (*Selection) Active

func (s *Selection) Active() (bool, error)

func (*Selection) AppendButton

func (s *Selection) AppendButton(text string) *Selection

func (*Selection) AppendCSS

func (s *Selection) AppendCSS(cssSelector string) *Selection

func (*Selection) AppendLabeled

func (s *Selection) AppendLabeled(text string) *Selection
func (s *Selection) AppendLink(text string) *Selection

func (*Selection) AppendXPath

func (s *Selection) AppendXPath(xPathSelector string) *Selection

func (*Selection) At

func (s *Selection) At(index int) *Selection

func (*Selection) Attribute

func (s *Selection) Attribute(attribute string) (string, error)

func (*Selection) CSS

func (s *Selection) CSS(property string) (string, error)

func (*Selection) Check

func (s *Selection) Check() error

func (*Selection) Click

func (s *Selection) Click() error

func (*Selection) Count

func (s *Selection) Count() (int, error)

func (*Selection) DoubleClick

func (s *Selection) DoubleClick() error

func (*Selection) Enabled

func (s *Selection) Enabled() (bool, error)

func (*Selection) EqualsElement

func (s *Selection) EqualsElement(other *Selection) (bool, error)

func (*Selection) Fill

func (s *Selection) Fill(text string) error

func (*Selection) Select

func (s *Selection) Select(text string) error

func (*Selection) Selected

func (s *Selection) Selected() (bool, error)

func (*Selection) Single

func (s *Selection) Single() *Selection

func (*Selection) String

func (s *Selection) String() string

func (*Selection) Submit

func (s *Selection) Submit() error

func (*Selection) SwitchToFrame

func (s *Selection) SwitchToFrame() error

func (*Selection) Text

func (s *Selection) Text() (string, error)

func (*Selection) Uncheck

func (s *Selection) Uncheck() error

func (*Selection) Visible

func (s *Selection) Visible() (bool, error)

type Selector

type Selector struct {
	Type    string
	Value   string
	Index   int
	Indexed bool
	Single  bool
}

func (Selector) API

func (s Selector) API() api.Selector

func (Selector) String

func (s Selector) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL