commit | 0371efdbc606b9c9e61bfe7f29739b851918859b | [log] [tgz] |
---|---|---|
author | Federico Sogaro <soggof@gmail.com> | Tue Jul 30 18:30:52 2013 |
committer | Federico Sogaro <soggof@gmail.com> | Tue Jul 30 18:30:52 2013 |
tree | d0e6e77a527e37e14a8132d651b5fad3fdd06d91 | |
parent | db7bd0fbc8591f158e8f7683f5d0ab8000bbcae4 [diff] |
readme updated
The package implements a WebDriver that communicate with a browser using the JSON Wire Protocol (See https://code.google.com/p/selenium/wiki/JsonWireProtocol). This is a pure go library and doesn't require a running Selenium driver. It currently supports Firefox (using the WebDriver extension) and Chrome (using the standalone server chromedriver). It should be fairly easy to add other browser that directly implement the wire protocol.
Version: 0.1 Tests are partial and have been run only on Linux (with firefox webdriver 2.32.0 and chromedriver 2.1).
Install: $ go get github.com/fedesog/webdriver
Requires: chromedriver (for chrome) https://code.google.com/p/chromedriver/
webdriver.xpi (for firefox) that is founds in the selenium-server-standalone file https://code.google.com/p/selenium/
// Example: // chromeDriver := webdriver.NewChromeDriver(“/path/to/chromedriver”) // err := chromeDriver.Start() // if err != nil { // log.Println(err) // } // desired := webdriver.Capabilities{“Platform”: “Linux”} // required := webdriver.Capabilities{} // session, err := chromeDriver.NewSession(desired, required) // if err != nil { // log.Println(err) // } // err = session.Url(“http://golang.org”) // if err != nil { // log.Println(err) // } // time.Sleep(10 * time.Second) // session.Delete() // chromeDriver.Stop()