Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Commit

Permalink
Update outdated godoc in various places
Browse files Browse the repository at this point in the history
  • Loading branch information
sclevine committed Feb 18, 2015
1 parent 4b465ea commit b920a9c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion agouti.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func NewPage(url string, options ...Option) (*Page, error) {
return newPage(session), nil
}

// SauceLabs opens a Sauce Labs session and returns a Page. Does not support Sauce Connect.
// SauceLabs opens a Sauce Labs session and returns a *Page. Does not support Sauce Connect.
func SauceLabs(name, platform, browser, version, username, accessKey string) (*Page, error) {
url := fmt.Sprintf("http://%s:%s@ondemand.saucelabs.com/wd/hub", username, accessKey)
capabilities := Capabilities{
Expand Down
3 changes: 2 additions & 1 deletion capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import "encoding/json"
// should use to configure a Page.
//
// For example, to open Firefox with JavaScript disabled:
// driver.Page(NewCapabilities().Browser("firefox").Without("javascriptEnabled"))
// capabilities := agouti.NewCapabilities().Browser("firefox").Without("javascriptEnabled")
// driver.NewPage(agouti.Desired(capabilities))
// See: https://code.google.com/p/selenium/wiki/DesiredCapabilities
//
// All methods called on this instance will modify the original instance.
Expand Down
2 changes: 1 addition & 1 deletion cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package agouti

import "encoding/json"

// Cookie defines a cookie for use with Page#SetCookie()
// Cookie defines a cookie for use with *Page#SetCookie()
type Cookie map[string]interface{}

// NewCookie returns a Cookie instance with the provided name and value.
Expand Down
4 changes: 2 additions & 2 deletions dsl/dsl.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Package dsl uses Ginkgo to implement a Capybara-like DSL for writing acceptance tests.
// This package is provided entirely for convenience. This DSL is not required to write
// Ginkgo acceptance tests using the core and matchers packages. Unlike the core package,
// the dsl package only permits a single running WebDriver.
// Ginkgo acceptance tests. Unlike the base agouti package, the dsl package only permits
// a single running WebDriver.
package dsl

import "github.com/onsi/ginkgo"
Expand Down
2 changes: 1 addition & 1 deletion page.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

// A Page represents an open browser session. Pages may be created using the
// WebDriver#Page() method or by calling the NewPage or SauceLabs functions.
// *WebDriver#Page() method or by calling the NewPage or SauceLabs functions.
type Page struct {
session pageSession
logs map[string][]Log
Expand Down
2 changes: 1 addition & 1 deletion selection.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// Selection instances refer to a selection of elements.
// Every Selection method is a valid MultiSelection method.
// All Selection methods are also MultiSelection methods.
//
// Methods that take selectors apply their selectors to each element in the
// selection they are called on. If the selection they are called on refers to multiple
Expand Down
10 changes: 5 additions & 5 deletions webdriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type WebDriver struct {
//
// Selenium JAR example:
// command := []string{"java", "-jar", "selenium-server.jar", "-port", "{{.Port}}"}
// core.NewWebDriver("http://{{.Address}}/wd/hub", command)
// agouti.NewWebDriver("http://{{.Address}}/wd/hub", command)
func NewWebDriver(url string, command []string, options ...Option) *WebDriver {
apiWebDriver := api.NewWebDriver(url, command)
defaultConfig := &config{timeout: apiWebDriver.Timeout}
Expand All @@ -51,11 +51,11 @@ func Selenium() *WebDriver {
return NewWebDriver("http://{{.Address}}/wd/hub", []string{"selenium-server", "-port", "{{.Port}}"})
}

// NewPage returns a new WebDriver session. The optional config argument
// configures the returned page. For instance:
// driver.Page(Use().Without("javascriptEnabled"))
// NewPage returns a *Page that corresponds to a new WebDriver session.
// Any provided options configure the page. For instance:
// driver.NewPage(agouti.Desired(agouti.NewCapabilities().Without("javascriptEnabled")))
// For Selenium, this argument must include a browser. For instance:
// seleniumDriver.Page(Use().Browser("safari"))
// seleniumDriver.NewPage(agouti.Desired(agouti.NewCapabilities().Browser("safari")))
func (w *WebDriver) NewPage(options ...Option) (*Page, error) {
desiredCapabilities := getOptions(options).desired

Expand Down

0 comments on commit b920a9c

Please sign in to comment.