agouti: github.com/sclevine/agouti/internal/mocks Index | Files

package mocks

import "github.com/sclevine/agouti/internal/mocks"

Index

Package Files

bus.go element.go element_repository.go session.go webdriver.go

type Bus Uses

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

func (*Bus) Send Uses

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

type Element Uses

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 Uses

func (e *Element) Clear() error

func (*Element) Click Uses

func (e *Element) Click() error

func (*Element) GetAttribute Uses

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

func (*Element) GetCSS Uses

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

func (*Element) GetElement Uses

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

func (*Element) GetElements Uses

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

func (*Element) GetID Uses

func (e *Element) GetID() string

func (*Element) GetLocation Uses

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

func (*Element) GetName Uses

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

func (*Element) GetText Uses

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

func (*Element) IsDisplayed Uses

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

func (*Element) IsEnabled Uses

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

func (*Element) IsEqualTo Uses

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

func (*Element) IsSelected Uses

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

func (*Element) Submit Uses

func (e *Element) Submit() error

func (*Element) Value Uses

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

type ElementRepository Uses

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 Uses

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

func (*ElementRepository) GetAtLeastOne Uses

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

func (*ElementRepository) GetExactlyOne Uses

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

type Session Uses

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 Uses

func (s *Session) AcceptAlert() error

func (*Session) Back Uses

func (s *Session) Back() error

func (*Session) ButtonDown Uses

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

func (*Session) ButtonUp Uses

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

func (*Session) Click Uses

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

func (*Session) Delete Uses

func (s *Session) Delete() error

func (*Session) DeleteCookie Uses

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

func (*Session) DeleteCookies Uses

func (s *Session) DeleteCookies() error

func (*Session) DeleteLocalStorage Uses

func (s *Session) DeleteLocalStorage() error

func (*Session) DeleteSessionStorage Uses

func (s *Session) DeleteSessionStorage() error

func (*Session) DeleteWindow Uses

func (s *Session) DeleteWindow() error

func (*Session) DismissAlert Uses

func (s *Session) DismissAlert() error

func (*Session) DoubleClick Uses

func (s *Session) DoubleClick() error

func (*Session) Execute Uses

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

func (*Session) Forward Uses

func (s *Session) Forward() error

func (*Session) Frame Uses

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

func (*Session) FrameParent Uses

func (s *Session) FrameParent() error

func (*Session) GetActiveElement Uses

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

func (*Session) GetAlertText Uses

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

func (*Session) GetCookies Uses

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

func (*Session) GetElement Uses

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

func (*Session) GetElements Uses

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

func (*Session) GetLogTypes Uses

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

func (*Session) GetScreenshot Uses

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

func (*Session) GetSource Uses

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

func (*Session) GetTitle Uses

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

func (*Session) GetURL Uses

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

func (*Session) GetWindow Uses

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

func (*Session) GetWindows Uses

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

func (*Session) MoveTo Uses

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

func (*Session) NewLogs Uses

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

func (*Session) Refresh Uses

func (s *Session) Refresh() error

func (*Session) SetAlertText Uses

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

func (*Session) SetCookie Uses

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

func (*Session) SetImplicitWait Uses

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

func (*Session) SetPageLoad Uses

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

func (*Session) SetScriptTimeout Uses

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

func (*Session) SetURL Uses

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

func (*Session) SetWindow Uses

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

func (*Session) SetWindowByName Uses

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

func (*Session) TouchClick Uses

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

func (*Session) TouchDoubleClick Uses

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

func (*Session) TouchDown Uses

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

func (*Session) TouchFlick Uses

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

func (*Session) TouchLongClick Uses

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

func (*Session) TouchMove Uses

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

func (*Session) TouchScroll Uses

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

func (*Session) TouchUp Uses

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

type WebDriver Uses

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 Uses

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

func (*WebDriver) Start Uses

func (w *WebDriver) Start() error

func (*WebDriver) Stop Uses

func (w *WebDriver) Stop() error

Package mocks imports 3 packages (graph). Updated 2016-07-31. Refresh now. Tools for package owners.