core

package
v0.0.0-...-9fd5d19 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DebugMode = true

DebugMode determines whether to run selenium in debug mode

Variables

View Source
var (
	// SeleniumPath is the path to the standalone Selenium server jar.
	SeleniumPath = "vendor/selenium-server.jar"

	// ChromeDriverPath is the path to the chrome driver.
	ChromeDriverPath = "vendor/chromedriver"

	// ChromeBinPath is the path to the chrome binary.
	ChromeBinPath = "vendor/chrome-linux/chrome"
)

Functions

func InitPaths

func InitPaths()

InitPaths initializes the absolute paths of the above paths.

func InitSelenium

func InitSelenium()

InitSelenium initializes selenium.

Types

type ChromeWebDriver

type ChromeWebDriver struct {
	WebDriver *selenium.WebDriver `json:"web_driver"` // The web driver itself
	Service   *selenium.Service   `json:"service"`    // The selenium service

	Options      []selenium.ServiceOption `json:"options"`      // The service configuration/options
	Capabilities selenium.Capabilities    `json:"Capabilities"` // The capabilities (further browser configuration)

	Running bool `json:"running"` // The status of the instance
	Port    int  `json:"port"`    // The port that the instance will run on
}

ChromeWebDriver is an abstraction class for a selenium chrome webdriver.

func NewChromeWebDriver

func NewChromeWebDriver(port int) (*ChromeWebDriver, error)

NewChromeWebDriver returns a new live web driver.

func (*ChromeWebDriver) Stop

func (cwd *ChromeWebDriver) Stop() error

Stop stops a ChromeWebDriver.

func (*ChromeWebDriver) String

func (cwd *ChromeWebDriver) String() string

String marshals a ChromeWebDriver.

Jump to

Keyboard shortcuts

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