seleniumTests

package
v0.0.0-...-fb315dc Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChromeClient

func NewChromeClient(seleniumEndpoint string) (selenium.WebDriver, error)

Types

type Action

type Action struct {
	Name         string `json:"name"`
	SearchOption `json:"searchOption"`
	*InputData   `json:"inputdata,omitempty"`
	*ClickButton `json:"clickbutton,omitempty"`
	*ClickLink   `json:"clicklink,omitempty"`
}

Action object

type CSSSelector

type CSSSelector struct {
}

CSSSelector Search by CSS

type Check

type Check struct {
	Name         string `json:"name"`
	SearchOption `json:"searchOption"`
	Value        *string `json:"value,omitempty"`
}

Check object

type ClassNameSelector

type ClassNameSelector struct {
}

ClassNameSelector Search by class

type ClickButton

type ClickButton struct {
}

ClickButton object

type ClickLink struct {
}

ClickLink object

type IDSelector

type IDSelector struct {
}

IDSelector Search by ID

type InputData

type InputData struct {
	Value string `json:"value"`
}

InputData Object

type LinkTextSelector

type LinkTextSelector struct {
}

LinkTextSelector search by link text

type NameSelector

type NameSelector struct {
}

NameSelector Search by name

type Page

type Page struct {
	Name      string   `json:"name"`
	PreCheck  *Check   `json:"precheck,omitempty"`
	Actions   []Action `json:"actions"`
	PostCheck *Check   `json:"postcheck,omitempty"`
}

Page object

type PartialLinkTextSelect

type PartialLinkTextSelect struct {
}

PartialLinkTextSelect search by partial link text

type SearchOption

type SearchOption struct {
	Multiple               bool   `json:"multiple"`
	SearchPattern          string `json:"searchPattern"`
	*CSSSelector           `json:"CSSSelector,omitempty"`
	*NameSelector          `json:"nameSelector,omitempty"`
	*TagNameSelector       `json:"tagNameSelector,omitempty"`
	*ClassNameSelector     `json:"classNameSelector,omitempty"`
	*IDSelector            `json:"IDSelector,omitempty"`
	*LinkTextSelector      `json:"linkTextSelector,omitempty"`
	*PartialLinkTextSelect `json:"partialLinkTextSelect,omitempty"`
	*XPathSelector         `json:"XPathSelector,omitempty"`
}

SearchOption allows you to specify how you would like to search

type Selenium

type Selenium struct {
	ID             bson.ObjectId `bson:"_id,omitempty" json:"omitempty"`
	SeleniumServer string
	Name           string
	InitialURL     string
	Pages          []Page
	Threshold      int
	Chats          []uint32

	Passing     bool
	ErrorCount  int
	LastChecked time.Time
	LastSuccess time.Time
}

halSelenium Object

type Service

type Service interface {
}

func NewService

func NewService(store Store, alertService alert.Service, calloutService callout.Service) Service

type Store

type Store interface {
	/*
		GetAllSeleniumTests returns all seleniumTests tests
	*/
	GetAllSeleniumTests() ([]Selenium, error)

	/*
		AddSelenium adds a test to the database
	*/
	AddSelenium(selenium Selenium) error

	/*
		SetSeleniumFailing sets thje seleniumTests test to a failed state
	*/
	SetSeleniumFailing(selenium *Selenium, err error) error

	/*
		SetSeleniumPassing sets the seleniumTests test to a passed state
	*/
	SetSeleniumPassing(selenium *Selenium) error
}

func NewMongoStore

func NewMongoStore(db *mgo.Database) Store

type TagNameSelector

type TagNameSelector struct {
}

TagNameSelector search by tag

type XPathSelector

type XPathSelector struct {
}

XPathSelector search by xpath

Jump to

Keyboard shortcuts

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