<commit_before># `selenium` - Selenium Client For Go

[![GoDoc](https://godoc.org/github.com/tebeka/selenium?status.svg)](https://godoc.org/github.com/tebeka/selenium)
[![Travis](https://travis-ci.org/tebeka/selenium.svg?branch=master)](https://travis-ci.org/tebeka/selenium)
[![Go Report Card](https://goreportcard.com/badge/github.com/tebeka/selenium)](https://goreportcard.com/report/github.com/tebeka/selenium)

## About

This is a [Selenium][selenium] client for [Go][go]. It supports the WebDriver
protocol and has been tested on [Selenium WebDriver][selenium] and
[ChromeDriver][chromedriver].

`selenium` is currently maintained by <NAME> ([@minusnine][minusnine]).

[selenium]: http://seleniumhq.org/
[go]: http://golang.org/
[server]: http://seleniumhq.org/download/
[chromedriver]: https://sites.google.com/a/chromium.org/chromedriver/
[minusnine]: http://github.com/minusnine

## Installing

Run

    go get github.com/tebeka/selenium

## Docs

Docs are at https://godoc.org/github.com/tebeka/selenium

### AppEngine

`GetHTTPClient` exposes the HTTP client used by the driver. You can access it to
add the request context.

    func myRequestHandler(w http.ResponseWriter, r *http.Request) {
        selenium.GetHTTPClient().Transport = &urlfetch.Transport{
            Context:  appengine.NewContext(r),
            Deadline: 30 * time.Second,
        }
        ...
    }

Thanks to [bthomson](https://bitbucket.org/tebeka/selenium/issue/8) for this
one.

## TODO

* Finish full [Selenium API][api].
* [SauceLabs][sauce] integration
* Add usage examples
* Support Firefox profiles
* Test Chrome interaction on Travis. Currently, only Firefox is tested.
* Any additional TODOs marked in the code.
* Allow testing on Windows and OS X.

[api]: https://www.w3.org/TR/webdriver/
[sauce]: http://saucelabs.com/docs/quickstart

## Known issues

### Selenium 2

1. Selenium 2 does not support versions of Firefox newer than 47.0.2.

### Selenium 3 and Geckodriver

1. [Geckodriver GetAllCookies does not return the expiration date of the
   cookie](https://github.com/mozilla/geckodriver/issues/463).
2. [Selenium 3 NewSession does not implement the W3C-specified
   parameters](https://github.com/SeleniumHQ/selenium/issues/2827).
3. [Selenium 3 NewSession does not support Firefox
   capabilities](https://github.com/SeleniumHQ/selenium/issues/3055).
4. [Marionnette does not implement the actions
   API](https://bugzilla.mozilla.org/show_bug.cgi?id=1292178), which is needed
   for keyboard and mouse actions, among others. Then, [Geckodriver doesn't
   implement this support](https://github.com/mozilla/geckodriver/issues/159).
   Then, [Selenium 3 doesn't implement this support for
   Firefox](https://github.com/SeleniumHQ/selenium/issues/2285).

The Geckodriver team recommends using the newest available Firefox version, as
the integration is actively being developed.

### ChromeDriver

1. ChromeDriver has not yet implemented the nascent W3C standard. So far, this
	 only means that GetCookie is not available for Chrome.
2. The current version of ChromeDriver, 2.27, only supports up to Chrome v56.
3. The Chrome flag `--disable_extensions` [is needed for Chrome versions >
	 56](https://bugs.chromium.org/p/chromedriver/issues/detail?id=1625).
	 However, this flag is deprecated in Chrome 57+. Therefore, this API<commit_msg>Update README.md now that the FirefoxOptions issue is fixed<commit_after># `selenium` - Selenium Client For Go

[![GoDoc](https://godoc.org/github.com/tebeka/selenium?status.svg)](https://godoc.org/github.com/tebeka/selenium)
[![Travis](https://travis-ci.org/tebeka/selenium.svg?branch=master)](https://travis-ci.org/tebeka/selenium)
[![Go Report Card](https://goreportcard.com/badge/github.com/tebeka/selenium)](https://goreportcard.com/report/github.com/tebeka/selenium)

## About

This is a [Selenium][selenium] client for [Go][go]. It supports the WebDriver
protocol and has been tested on [Selenium WebDriver][selenium] and
[ChromeDriver][chromedriver].

`selenium` is currently maintained by <NAME> ([@minusnine][minusnine]).

[selenium]: http://seleniumhq.org/
[go]: http://golang.org/
[server]: http://seleniumhq.org/download/
[chromedriver]: https://sites.google.com/a/chromium.org/chromedriver/
[minusnine]: http://github.com/minusnine

## Installing

Run

    go get github.com/tebeka/selenium

## Docs

Docs are at https://godoc.org/github.com/tebeka/selenium

### AppEngine

`GetHTTPClient` exposes the HTTP client used by the driver. You can access it to
add the request context.

    func myRequestHandler(w http.ResponseWriter, r *http.Request) {
        selenium.GetHTTPClient().Transport = &urlfetch.Transport{
            Context:  appengine.NewContext(r),
            Deadline: 30 * time.Second,
        }
        ...
    }

Thanks to [bthomson](https://bitbucket.org/tebeka/selenium/issue/8) for this
one.

## TODO

* Finish full [Selenium API][api].
* [SauceLabs][sauce] integration
* Add usage examples
* Support Firefox profiles
* Test Chrome interaction on Travis. Currently, only Firefox is tested.
* Any additional TODOs marked in the code.
* Allow testing on Windows and OS X.

[api]: https://www.w3.org/TR/webdriver/
[sauce]: http://saucelabs.com/docs/quickstart

## Known issues

### Selenium 2

1. Selenium 2 does not support versions of Firefox newer than 47.0.2.

### Selenium 3 and Geckodriver

1. [Geckodriver GetAllCookies does not return the expiration date of the
   cookie](https://github.com/mozilla/geckodriver/issues/463).
2. [Selenium 3 NewSession does not implement the W3C-specified
   parameters](https://github.com/SeleniumHQ/selenium/issues/2827).
3. [Marionnette does not implement the actions
   API](https://bugzilla.mozilla.org/show_bug.cgi?id=1292178), which is needed
   for keyboard and mouse actions, among others. Then, [Geckodriver doesn't
   implement this support](https://github.com/mozilla/geckodriver/issues/159).
   Then, [Selenium 3 doesn't implement this support for
   Firefox](https://github.com/SeleniumHQ/selenium/issues/2285).

The Geckodriver team recommends using the newest available Firefox version, as
the integration is actively being developed.

### ChromeDriver

1. ChromeDriver has not yet implemented the nascent W3C standard. So far, this
	 only means that GetCookie is not available for Chrome.
2. The current version of ChromeDriver, 2.27, only supports up to Chrome v56.
3. The Chrome flag `--disable_extensions` [is needed for Chrome versions >
	 56](https://bugs.chromium.org/p/chromedriver/issues/detail?id=1625).
	 However, this flag is deprecated in Chrome 57+. Therefore, this API
{'fraction_non_alphanumeric': 0.12316759860964183, 'fraction_numerical': 0.017832854768021763, 'mean_word_length': 4.2733067729083665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 33, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6451128', 'n_tokens_mistral': 2285, 'n_tokens_neox': 2088, 'n_words': 592}