webtest

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: 7 Imported by: 0

Documentation

Overview

Package webtest provides WebDriver provisioning and information APIs.

Provision a browser:

import "github.com/bazelbuild/rules_webtesting/go/webtest"

driver, err := webtest.NewWebDriverSession(nil)

Provision a browser with capabilities (as an example profiling):

capabilities := map[string]interface{}{
  "webdriver.logging.profiler.enabled": true,
}
driver, err := webtest.NewWebDriverSession(capabilities)

Get basic information about the browser defined by the web test environment:

info, err := webtest.GetBrowserInfo()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPAddress

func HTTPAddress() (*url.URL, error)

HTTPAddress returns the HTTP address of WTL.

func HTTPSAddress

func HTTPSAddress() (*url.URL, error)

HTTPSAddress returns the HTTPS address of WTL.

func NewWebDriverSession

func NewWebDriverSession(capabilities selenium.Capabilities) (selenium.WebDriver, error)

NewWebDriverSession provisions and returns a new WebDriver session.

Types

type BrowserInfo

type BrowserInfo struct {
	// The Bazel label for the browser.
	BrowserLabel string
	// The Environment that Web Test Launcher is using for the specified configuration.
	Environment string
}

BrowserInfo represents basic information about the browser defined by the web test environment.

func GetBrowserInfo

func GetBrowserInfo() (*BrowserInfo, error)

GetBrowserInfo returns basic information about the browser defined by the web test environment.

Jump to

Keyboard shortcuts

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