driver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2018 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Overview

Package driver launches a WebDriver driver endpoint binary (e.g. ChromeDriver, SafariDriver, etc) based on a google:wslConfig capability.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Address string
	// contains filtered or unexported fields
}

Driver is wrapper around a running WebDriver endpoint binary.

func New

func New(ctx context.Context, localHost, sessionID string, caps map[string]interface{}) (*Driver, error)

New creates starts a WebDriver endpoint binary based on caps. Argument caps should just be the google:wslConfig capability extracted from the capabilities passed into a new session request.

func (*Driver) Forward

func (d *Driver) Forward(w http.ResponseWriter, r *http.Request)

Forward forwards a request to the WebDriver endpoint managed by this server.

func (*Driver) NewSession

func (d *Driver) NewSession(ctx context.Context, caps *capabilities.Capabilities, w http.ResponseWriter) (string, error)

NewSessionW3C creates a new session using the W3C protocol.

func (*Driver) Shutdown

func (d *Driver) Shutdown(ctx context.Context) error

Kill kills a running WebDriver server.

func (*Driver) Wait

func (d *Driver) Wait(ctx context.Context) error

Wait waits for the driver binary to exit, and returns an error if the binary exited with an error.

Jump to

Keyboard shortcuts

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