mocks

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus struct {
	SendCall struct {
		Endpoint string
		Method   string
		BodyJSON []byte
		Result   string
		Err      error
	}
}

func (*Bus) Send

func (b *Bus) Send(method, endpoint string, body, result interface{}) error

type Element

type Element struct {
	GetElementCall struct {
		Selector      api.Selector
		ReturnElement *api.Element
		Err           error
	}

	GetElementsCall struct {
		Selector       api.Selector
		ReturnElements []*api.Element
		Err            error
	}

	GetIDCall struct {
		ReturnText string
	}

	GetTextCall struct {
		ReturnText string
		Err        error
	}

	GetNameCall struct {
		ReturnName string
		Err        error
	}

	GetAttributeCall struct {
		Attribute   string
		ReturnValue string
		Err         error
	}

	GetCSSCall struct {
		Property    string
		ReturnValue string
		Err         error
	}

	ClickCall struct {
		Called bool
		Err    error
	}

	ClearCall struct {
		Called bool
		Err    error
	}

	ValueCall struct {
		Text string
		Err  error
	}

	IsSelectedCall struct {
		ReturnSelected bool
		Err            error
	}

	IsDisplayedCall struct {
		ReturnDisplayed bool
		Err             error
	}

	IsEnabledCall struct {
		ReturnEnabled bool
		Err           error
	}

	SubmitCall struct {
		Called bool
		Err    error
	}

	IsEqualToCall struct {
		Element      *api.Element
		ReturnEquals bool
		Err          error
	}

	GetLocationCall struct {
		ReturnX int
		ReturnY int
		Err     error
	}
}

func (*Element) Clear

func (e *Element) Clear() error

func (*Element) Click

func (e *Element) Click() error

func (*Element) GetAttribute

func (e *Element) GetAttribute(attribute string) (string, error)

func (*Element) GetCSS

func (e *Element) GetCSS(property string) (string, error)

func (*Element) GetElement

func (e *Element) GetElement(selector api.Selector) (*api.Element, error)

func (*Element) GetElements

func (e *Element) GetElements(selector api.Selector) ([]*api.Element, error)

func (*Element) GetID

func (e *Element) GetID() string

func (*Element) GetLocation

func (e *Element) GetLocation() (x, y int, err error)

func (*Element) GetName

func (e *Element) GetName() (string, error)

func (*Element) GetText

func (e *Element) GetText() (string, error)

func (*Element) IsDisplayed

func (e *Element) IsDisplayed() (bool, error)

func (*Element) IsEnabled

func (e *Element) IsEnabled() (bool, error)

func (*Element) IsEqualTo

func (e *Element) IsEqualTo(other *api.Element) (bool, error)

func (*Element) IsSelected

func (e *Element) IsSelected() (bool, error)

func (*Element) Submit

func (e *Element) Submit() error

func (*Element) Value

func (e *Element) Value(text string) error

type ElementRepository

type ElementRepository struct {
	GetCall struct {
		ReturnElements []element.Element
		Err            error
	}

	GetExactlyOneCall struct {
		ReturnElement element.Element
		Err           error
	}

	GetAtLeastOneCall struct {
		ReturnElements []element.Element
		Err            error
	}
}

func (*ElementRepository) Get

func (e *ElementRepository) Get() ([]element.Element, error)

func (*ElementRepository) GetAtLeastOne

func (e *ElementRepository) GetAtLeastOne() ([]element.Element, error)

func (*ElementRepository) GetExactlyOne

func (e *ElementRepository) GetExactlyOne() (element.Element, error)

type Session

type Session struct {
	GetElementCall struct {
		Selector      api.Selector
		ReturnElement *api.Element
		Err           error
	}

	GetElementsCall struct {
		Selector       api.Selector
		ReturnElements []*api.Element
		Err            error
	}

	GetActiveElementCall struct {
		ReturnElement *api.Element
		Err           error
	}

	DeleteCall struct {
		Called bool
		Err    error
	}

	GetWindowCall struct {
		ReturnWindow *api.Window
		Err          error
	}

	GetWindowsCall struct {
		ReturnWindows []*api.Window
		Err           error
	}

	SetWindowCall struct {
		Window *api.Window
		Err    error
	}

	SetWindowByNameCall struct {
		Name string
		Err  error
	}

	DeleteWindowCall struct {
		Called bool
		Err    error
	}

	GetScreenshotCall struct {
		ReturnImage []byte
		Err         error
	}

	GetCookiesCall struct {
		ReturnCookies []*api.Cookie
		Err           error
	}

	SetCookieCall struct {
		Cookie *api.Cookie
		Err    error
	}

	DeleteCookieCall struct {
		Name string
		Err  error
	}

	DeleteCookiesCall struct {
		Called bool
		Err    error
	}

	GetURLCall struct {
		ReturnURL string
		Err       error
	}

	SetURLCall struct {
		URL string
		Err error
	}

	GetTitleCall struct {
		ReturnTitle string
		Err         error
	}

	GetSourceCall struct {
		ReturnSource string
		Err          error
	}

	MoveToCall struct {
		Element *api.Element
		Offset  api.Offset
		Err     error
	}

	FrameCall struct {
		Frame *api.Element
		Err   error
	}

	FrameParentCall struct {
		Called bool
		Err    error
	}

	ExecuteCall struct {
		Body      string
		Arguments []interface{}
		Result    string
		Err       error
	}

	ForwardCall struct {
		Called bool
		Err    error
	}

	BackCall struct {
		Called bool
		Err    error
	}

	RefreshCall struct {
		Called bool
		Err    error
	}

	GetAlertTextCall struct {
		ReturnText string
		Err        error
	}

	SetAlertTextCall struct {
		Text string
		Err  error
	}

	AcceptAlertCall struct {
		Called bool
		Err    error
	}

	DismissAlertCall struct {
		Called bool
		Err    error
	}

	NewLogsCall struct {
		LogType    string
		ReturnLogs []api.Log
		Err        error
	}

	GetLogTypesCall struct {
		ReturnTypes []string
		Err         error
	}

	DoubleClickCall struct {
		Called bool
		Err    error
	}

	ClickCall struct {
		Button api.Button
		Err    error
	}

	ButtonDownCall struct {
		Button api.Button
		Err    error
	}

	ButtonUpCall struct {
		Button api.Button
		Err    error
	}

	TouchDownCall struct {
		X   int
		Y   int
		Err error
	}

	TouchUpCall struct {
		X   int
		Y   int
		Err error
	}

	TouchMoveCall struct {
		X   int
		Y   int
		Err error
	}

	TouchScrollCall struct {
		Element *api.Element
		Offset  api.Offset
		Err     error
	}

	TouchClickCall struct {
		Element *api.Element
		Err     error
	}

	TouchFlickCall struct {
		Element *api.Element
		Offset  api.Offset
		Speed   api.Speed
		Err     error
	}

	TouchDoubleClickCall struct {
		Element *api.Element
		Err     error
	}

	TouchLongClickCall struct {
		Element *api.Element
		Err     error
	}

	DeleteLocalStorageCall struct {
		Called bool
		Err    error
	}

	DeleteSessionStorageCall struct {
		Called bool
		Err    error
	}

	SetImplicitWaitCall struct {
		Called bool
		Err    error
	}

	SetPageLoadCall struct {
		Called bool
		Err    error
	}

	SetScriptTimeoutCall struct {
		Called bool
		Err    error
	}
}

func (*Session) AcceptAlert

func (s *Session) AcceptAlert() error

func (*Session) Back

func (s *Session) Back() error

func (*Session) ButtonDown

func (s *Session) ButtonDown(button api.Button) error

func (*Session) ButtonUp

func (s *Session) ButtonUp(button api.Button) error

func (*Session) Click

func (s *Session) Click(button api.Button) error

func (*Session) Delete

func (s *Session) Delete() error

func (*Session) DeleteCookie

func (s *Session) DeleteCookie(name string) error

func (*Session) DeleteCookies

func (s *Session) DeleteCookies() error

func (*Session) DeleteLocalStorage

func (s *Session) DeleteLocalStorage() error

func (*Session) DeleteSessionStorage

func (s *Session) DeleteSessionStorage() error

func (*Session) DeleteWindow

func (s *Session) DeleteWindow() error

func (*Session) DismissAlert

func (s *Session) DismissAlert() error

func (*Session) DoubleClick

func (s *Session) DoubleClick() error

func (*Session) Execute

func (s *Session) Execute(body string, arguments []interface{}, result interface{}) error

func (*Session) Forward

func (s *Session) Forward() error

func (*Session) Frame

func (s *Session) Frame(frame *api.Element) error

func (*Session) FrameParent

func (s *Session) FrameParent() error

func (*Session) GetActiveElement

func (s *Session) GetActiveElement() (*api.Element, error)

func (*Session) GetAlertText

func (s *Session) GetAlertText() (string, error)

func (*Session) GetCookies

func (s *Session) GetCookies() ([]*api.Cookie, error)

func (*Session) GetElement

func (s *Session) GetElement(selector api.Selector) (*api.Element, error)

func (*Session) GetElements

func (s *Session) GetElements(selector api.Selector) ([]*api.Element, error)

func (*Session) GetLogTypes

func (s *Session) GetLogTypes() ([]string, error)

func (*Session) GetScreenshot

func (s *Session) GetScreenshot() ([]byte, error)

func (*Session) GetSource

func (s *Session) GetSource() (string, error)

func (*Session) GetTitle

func (s *Session) GetTitle() (string, error)

func (*Session) GetURL

func (s *Session) GetURL() (string, error)

func (*Session) GetWindow

func (s *Session) GetWindow() (*api.Window, error)

func (*Session) GetWindows

func (s *Session) GetWindows() ([]*api.Window, error)

func (*Session) MoveTo

func (s *Session) MoveTo(element *api.Element, offset api.Offset) error

func (*Session) NewLogs

func (s *Session) NewLogs(logType string) ([]api.Log, error)

func (*Session) Refresh

func (s *Session) Refresh() error

func (*Session) SetAlertText

func (s *Session) SetAlertText(text string) error

func (*Session) SetCookie

func (s *Session) SetCookie(cookie *api.Cookie) error

func (*Session) SetImplicitWait

func (s *Session) SetImplicitWait(timeout int) error

func (*Session) SetPageLoad

func (s *Session) SetPageLoad(timeout int) error

func (*Session) SetScriptTimeout

func (s *Session) SetScriptTimeout(timeout int) error

func (*Session) SetURL

func (s *Session) SetURL(url string) error

func (*Session) SetWindow

func (s *Session) SetWindow(window *api.Window) error

func (*Session) SetWindowByName

func (s *Session) SetWindowByName(name string) error

func (*Session) TouchClick

func (s *Session) TouchClick(element *api.Element) error

func (*Session) TouchDoubleClick

func (s *Session) TouchDoubleClick(element *api.Element) error

func (*Session) TouchDown

func (s *Session) TouchDown(x, y int) error

func (*Session) TouchFlick

func (s *Session) TouchFlick(element *api.Element, offset api.Offset, speed api.Speed) error

func (*Session) TouchLongClick

func (s *Session) TouchLongClick(element *api.Element) error

func (*Session) TouchMove

func (s *Session) TouchMove(x, y int) error

func (*Session) TouchScroll

func (s *Session) TouchScroll(element *api.Element, offset api.Offset) error

func (*Session) TouchUp

func (s *Session) TouchUp(x, y int) error

type WebDriver

type WebDriver struct {
	OpenCall struct {
		Desired       map[string]interface{}
		ReturnSession *api.Session
		Err           error
	}

	StartCall struct {
		Called bool
		Err    error
	}

	StopCall struct {
		Called bool
		Err    error
	}
}

func (*WebDriver) Open

func (w *WebDriver) Open(desired map[string]interface{}) (*api.Session, error)

func (*WebDriver) Start

func (w *WebDriver) Start() error

func (*WebDriver) Stop

func (w *WebDriver) Stop() error

Jump to

Keyboard shortcuts

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