selenium: Index | Files

package seleniumtest

import ""

Package seleniumtest provides tests to exercise package selenium. These tests are in a separate package to allow other test harnesses to validate their behavior.


Package Files



var Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    path := r.URL.Path
    page, ok := map[string]string{
        "/":       homePage,
        "/other":  otherPage,
        "/search": searchPage,
        "/log":    logPage,
        "/frame":  framePage,
        "/title":  titleChangePage,
        "/alert":  alertPage,
    if !ok {
        http.NotFound(w, r)

    if path == "/search" {
        if len(r.Form) > 0 {
            page = fmt.Sprintf(page, r.Form["q"][0], r.Form["s"][0])

    for i := 0; i < 3; i++ {
        http.SetCookie(w, &http.Cookie{
            Name:  fmt.Sprintf("cookie-%d", i),
            Value: fmt.Sprintf("value-%d", i),
    fmt.Fprintf(w, page)
var NewRemote = func(_ *testing.T, caps selenium.Capabilities, addr string) (selenium.WebDriver, error) {
    return selenium.NewRemote(caps, addr)

func RunChromeTests Uses

func RunChromeTests(t *testing.T, c Config)

func RunCommonTests Uses

func RunCommonTests(t *testing.T, c Config)

func RunFirefoxTests Uses

func RunFirefoxTests(t *testing.T, c Config)

type Config Uses

type Config struct {
    Addr, Browser, Path, ServerURL string
    Sauce                          *sauce.Capabilities
    SeleniumVersion                semver.Version
    ServiceOptions                 []selenium.ServiceOption
    Headless                       bool
    SkipProxy                      bool

Package seleniumtest imports 24 packages (graph). Updated 2019-08-07. Refresh now. Tools for package owners.