func NewWebDriver(url string, command []string, options ...Option) *WebDriver {
	apiWebDriver := api.NewWebDriver(url, command)
	defaultOptions := config{Timeout: apiWebDriver.Timeout}.Merge(options)
	apiWebDriver.Timeout = defaultOptions.Timeout
	apiWebDriver.Debug = defaultOptions.Debug
	apiWebDriver.HTTPClient = defaultOptions.HTTPClient
	return &WebDriver{apiWebDriver, defaultOptions}
}
func NewWebDriver(url string, command []string, options ...Option) *WebDriver {
	apiWebDriver := api.NewWebDriver(url, command)
	defaultOptions := config{Timeout: apiWebDriver.Timeout}.Merge(options)
	apiWebDriver.Timeout = defaultOptions.Timeout
	apiWebDriver.Debug = defaultOptions.Debug
	apiWebDriver.HTTPClient = defaultOptions.HTTPClient
	return &WebDriver{apiWebDriver, defaultOptions}
}
func NewWebDriver ( url string , command [ ] string , options ... Option ) * WebDriver { apiWebDriver := api . NewWebDriver ( url , command ) defaultOptions := config { Timeout : apiWebDriver . Timeout } . Merge ( options ) apiWebDriver . Timeout = defaultOptions . Timeout apiWebDriver . Debug = defaultOptions . Debug apiWebDriver . HTTPClient = defaultOptions . HTTPClient return & WebDriver { apiWebDriver , defaultOptions } }
// NewWebDriver returns an instance of a WebDriver specified by
// a templated URL and command. The URL should be the location of the
// WebDriver Wire Protocol web service brought up by the command. The
// command should be provided as a list of arguments (each of which are
// templated).
//
// The Timeout Option specifies how many seconds to wait for the web service
// to become available. The default timeout is 5 seconds.
//
// The HTTPClient Option specifies a *http.Client to use for all WebDriver
// communications. The default client is http.DefaultClient.
//
// Any other provided Options are treated as default Options for new pages.
//
// Valid template parameters are:
//   {{.Host}} - local address to bind to (usually 127.0.0.1)
//   {{.Port}} - arbitrary free port on the local address
//   {{.Address}} - {{.Host}}:{{.Port}}
//
// Selenium JAR example:
//   command := []string{"java", "-jar", "selenium-server.jar", "-port", "{{.Port}}"}
//   agouti.NewWebDriver("http://{{.Address}}/wd/hub", command)
NewWebDriver returns an instance of a WebDriver specified by a templated URL and command . The URL should be the location of the WebDriver Wire Protocol web service brought up by the command . The command should be provided as a list of arguments ( each of which are templated ) . The Timeout Option specifies how many seconds to wait for the web service to become available . The default timeout is 5 seconds . The HTTPClient Option specifies a * http . Client to use for all WebDriver communications . The default client is http . DefaultClient . Any other provided Options are treated as default Options for new pages . Valid template parameters are : {{ . Host }} - local address to bind to ( usually 127 . 0 . 0 . 1 ) {{ . Port }} - arbitrary free port on the local address {{ . Address }} - {{ . Host }} : {{ . Port }} Selenium JAR example : command : = [] string { java - jar selenium - server . jar - port {{ . Port }} } agouti . NewWebDriver ( http : // {{ . Address }} / wd / hub command )