func (s Session) GetUrl() (string, error) {
	_, data, err := s.wd.do(nil, "GET", "/session/%s/url", s.Id)
	if err != nil {
		return "", err
	}
	var url string
	err = json.Unmarshal(data, &url)
	return url, err
}
Retrieve the URL of the current page.
package webdriver
import (
	"bytes"
	"encoding/base64"
	"encoding/json"
	"errors"
	"io/ioutil"
)
type WebDriver interface {
	Start() error
	Stop() error
	Status() (*Status, error)
	NewSession(desired, required Capabilities) (*Session, error)
	Sessions() ([]Session, error)
	do(params interface{}, method, urlFormat string, urlParams ...interface{}) (string, []byte, error)
}
type params map[string]interface{}
type Status struct {
	Build Build
	OS    OS
}
type Build struct {
	Version  string
	Revision string
	Time     string
}
type OS struct {
	Arch    string
	Name    string
	Version string
}
type Capabilities map[string]interface{}
type Session struct {
	Id           string
	Capabilities Capabilities
	wd           WebDriver
}
type WindowHandle struct {
	s  *Session
	id string
}
type Size struct {
	Width  int
	Height int
}
type Position struct {
	X int
	Y int
}
type FindElementStrategy string
const (
	ClassName = FindElementStrategy("class name")
	CSS_Selector = FindElementStrategy("css selector")
	ID = FindElementStrategy("id")
	Name = FindElementStrategy("name")
	LinkText = FindElementStrategy("link text")
	PartialLinkText = FindElementStrategy("partial link text")
	TagName = FindElementStrategy("tag name")
	XPath = FindElementStrategy("xpath")
)
type element struct {
	ELEMENT string
}
type WebElement struct {
	s  *Session
	id string
}
type Cookie struct {
	Name   string
	Value  string
	Path   string
	Domain string
	Secure bool
	Expiry int
}
type GeoLocation struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Altitude  float64 `json:"altitude"`
}
type LogLevel string
const (
	LogAll     = LogLevel("ALL")
	LogDebug   = LogLevel("DEBUG")
	LogInfo    = LogLevel("INFO")
	LogWarning = LogLevel("WARNING")
	LogSevere  = LogLevel("SEVERE")
	LogOff     = LogLevel("OFF")
)
type LogEntry struct {
	TimeStamp int  
	Level     string
	Message   string
}
type HTML5CacheStatus int
const (
	CacheStatusUncached    = HTML5CacheStatus(0)
	CacheStatusIdle        = HTML5CacheStatus(1)
	CacheStatusChecking    = HTML5CacheStatus(2)
	CacheStatusDownloading = HTML5CacheStatus(3)
	CacheStatusUpdateReady = HTML5CacheStatus(4)
	CacheStatusObsolete    = HTML5CacheStatus(5)
)
func (s Session) GetCapabilities() Capabilities {
	return s.Capabilities
}
func (s Session) Delete() error {
	_, _, err := s.wd.do(nil, "DELETE", "/session/%s", s.Id)
	return err
}
func (s Session) SetTimeouts(typ string, ms int) error {
	p := params{"type": typ, "ms": ms}
	_, _, err := s.wd.do(p, "POST", "/session/%s/timeouts", s.Id)
	return err
}
func (s Session) SetTimeoutsAsyncScript(ms int) error {
	p := params{"ms": ms}
	_, _, err := s.wd.do(p, "POST", "/session/%s/timeouts/async_script", s.Id)
	return err
}
func (s Session) SetTimeoutsImplicitWait(ms int) error {
	p := params{"ms": ms}
	_, _, err := s.wd.do(p, "POST", "/session/%s/timeouts/implicit_wait", s.Id)
	return err
}
func (s Session) GetCurrentWindowHandle() WindowHandle {
	return WindowHandle{&s, "current"}
}
func (s Session) WindowHandle() (WindowHandle, error) {
	_, data, err := s.wd.do(nil, "GET", "/session/%s/window_handle", s.Id)
	if err != nil {
		return WindowHandle{}, err
	}
	var handle string
	err = json.Unmarshal(data, &handle)
	return WindowHandle{&s, handle}, err
}
func (s Session) WindowHandles() ([]WindowHandle, error) {
	_, data, err := s.wd.do(nil, "GET", "/session/%s/window_handles", s.Id)
	if err != nil {
		return nil, err
	}
	var hv []string
	err = json.Unmarshal(data, &hv)
	if err != nil {
		return nil, err
	}
	var handles = make([]WindowHandle, len(hv))
	for i, h := range hv {
		handles[i] = WindowHandle{&s, h}
	}
	return handles, nil
}