webdriver

package
v2.0.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChromeDriverDefaultPath

func ChromeDriverDefaultPath() string

func CloseServer

func CloseServer(browserName ...string) error

func Fetch

func Fetch(pageURL string) ([]byte, error)

func InitServer

func InitServer(browserName ...string) (driver selenium.WebDriver, err error)

func StartService

func StartService(driverPath string, port int, opts ...selenium.ServiceOption) (service *selenium.Service, err error)

Types

type Page

type Page struct {
	Driver selenium.WebDriver
}

func NewPage

func NewPage(drivers ...selenium.WebDriver) (page Page)

func (*Page) FindElementByClass

func (s *Page) FindElementByClass(locator string) selenium.WebElement

func (*Page) FindElementByCss

func (s *Page) FindElementByCss(locator string) selenium.WebElement

func (*Page) FindElementById

func (s *Page) FindElementById(locator string) selenium.WebElement

func (*Page) FindElementByLinkText

func (s *Page) FindElementByLinkText(locator string) selenium.WebElement

func (*Page) FindElementByName

func (s *Page) FindElementByName(locator string) selenium.WebElement
func (s *Page) FindElementByPartialLink(locator string) selenium.WebElement

func (*Page) FindElementByTag

func (s *Page) FindElementByTag(locator string) selenium.WebElement

func (*Page) FindElementByXpath

func (s *Page) FindElementByXpath(locator string) selenium.WebElement

func (*Page) FindElementsByClass

func (s *Page) FindElementsByClass(locator string) []selenium.WebElement

func (*Page) FindElementsByCss

func (s *Page) FindElementsByCss(locator string) []selenium.WebElement

func (*Page) FindElementsById

func (s *Page) FindElementsById(locator string) []selenium.WebElement

func (*Page) FindElementsByLinkText

func (s *Page) FindElementsByLinkText(locator string) []selenium.WebElement

func (*Page) FindElementsByName

func (s *Page) FindElementsByName(locator string) []selenium.WebElement
func (s *Page) FindElementsByPartialLink(locator string) []selenium.WebElement

func (*Page) FindElementsByTag

func (s *Page) FindElementsByTag(locator string) []selenium.WebElement

func (*Page) FindElementsByXpath

func (s *Page) FindElementsByXpath(locator string) []selenium.WebElement

func (*Page) MouseHoverToElement

func (s *Page) MouseHoverToElement(locator string) selenium.WebElement

type WebDriver

type WebDriver struct {
	Driver selenium.WebDriver

	*collector.Base
	// contains filtered or unexported fields
}

func New

func New() *WebDriver

func (*WebDriver) Close

func (s *WebDriver) Close() error

func (*WebDriver) Description

func (s *WebDriver) Description() string

func (*WebDriver) Do

func (s *WebDriver) Do(pageURL string, data echo.Store) ([]byte, error)

func (*WebDriver) Name

func (s *WebDriver) Name() string

func (*WebDriver) Start

func (s *WebDriver) Start(opt echo.Store) (err error)

Jump to

Keyboard shortcuts

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