Skip to content

bborbe/webdriver

This branch is 23 commits ahead of, 1 commit behind fedesog/webdriver:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

298661d · Aug 29, 2018

History

29 Commits
May 18, 2018
May 18, 2018
Jul 30, 2013
Apr 19, 2018
Feb 26, 2016
Aug 25, 2016
Jul 30, 2013
Jul 30, 2013
Aug 25, 2016
Aug 25, 2016
Jan 16, 2017
Jul 30, 2013
Feb 26, 2016
Aug 25, 2016

Repository files navigation

webdriver

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/bborbe/webdriver

Requires:

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()

About

Implementation of JSONWireProtocol in go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.6%
  • Makefile 0.4%