{"id":13459716,"url":"https://github.com/tebeka/selenium","last_synced_at":"2025-05-13T17:07:48.544Z","repository":{"id":2842265,"uuid":"3845814","full_name":"tebeka/selenium","owner":"tebeka","description":"Selenium/Webdriver client for Go","archived":false,"fork":false,"pushed_at":"2025-01-28T17:30:32.000Z","size":481,"stargazers_count":2588,"open_issues_count":163,"forks_count":412,"subscribers_count":54,"default_branch":"master","last_synced_at":"2025-04-24T01:51:51.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"andresgottlieb/soundcast","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tebeka.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-03-27T16:21:44.000Z","updated_at":"2025-04-23T21:38:30.000Z","dependencies_parsed_at":"2025-02-13T09:00:47.578Z","dependency_job_id":"f4a946a4-6c10-4ca2-80aa-0ee6d8fd0782","html_url":"https://github.com/tebeka/selenium","commit_stats":{"total_commits":544,"total_committers":35,"mean_commits":"15.542857142857143","dds":0.375,"last_synced_commit":"e9100b7f5ac11727841302026707e3961ba14712"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tebeka%2Fselenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tebeka%2Fselenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tebeka%2Fselenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tebeka%2Fselenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tebeka","download_url":"https://codeload.github.com/tebeka/selenium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990466,"owners_count":21995774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T10:00:26.932Z","updated_at":"2025-05-13T17:07:48.508Z","avatar_url":"https://github.com/tebeka.png","language":"Go","readme":"# The most complete, best-tested WebDriver client for Go\n\n[![GoDoc](https://godoc.org/github.com/tebeka/selenium?status.svg)](https://godoc.org/github.com/tebeka/selenium)\n[![Travis](https://travis-ci.org/tebeka/selenium.svg?branch=master)](https://travis-ci.org/tebeka/selenium)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tebeka/selenium)](https://goreportcard.com/report/github.com/tebeka/selenium)\n\n## About\n\nThis is a [WebDriver][selenium] client for [Go][go]. It supports the\n[WebDriver protocol][webdriver] and has been tested with various versions of\n[Selenium WebDriver][selenium], Firefox and [Geckodriver][geckodriver], and\nChrome and [ChromeDriver][chromedriver],\n\n`selenium` is currently maintained by Eric Garrido ([@minusnine][minusnine]).\n\n[selenium]: http://seleniumhq.org/\n[webdriver]: https://www.w3.org/TR/webdriver/\n[go]: http://golang.org/\n[server]: http://seleniumhq.org/download/\n[geckodriver]: https://github.com/mozilla/geckodriver\n[chromedriver]: https://sites.google.com/a/chromium.org/chromedriver/\n[minusnine]: http://github.com/minusnine\n\n## Installing\n\nRun\n\n    go get -t -d github.com/tebeka/selenium\n\nto fetch the package.\n\nThe package requires a working WebDriver installation, which can include recent\nversions of a web browser being driven by Selenium WebDriver.\n\n### Downloading Dependencies\n\nWe provide a means to download the ChromeDriver binary, the Firefox binary, the\nSelenium WebDriver JARs, and the Sauce Connect proxy binary. This is primarily\nintended for testing.\n\n    $ cd vendor\n    $ go run init.go --alsologtostderr  --download_browsers --download_latest\n    $ cd ..\n\nRe-run this periodically to get up-to-date versions of these binaries.\n\n## Documentation\n\nThe API documentation is at https://godoc.org/github.com/tebeka/selenium. See [the example](https://github.com/tebeka/selenium/blob/master/example_test.go) and unit tests(for [sauce](https://github.com/tebeka/selenium/blob/master/sauce_test.go), [selenium](https://github.com/tebeka/selenium/blob/master/selenium_test.go) and [service](https://github.com/tebeka/selenium/blob/master/service_test.go)) for better usage information.\n\n## Known Issues\n\nAny issues are usually because the underlying browser automation framework has a\nbug or inconsistency. Where possible, we try to cover up these underlying\nproblems in the client, but sometimes workarounds require higher-level\nintervention.\n\nPlease feel free to [file an issue][issue] if this client doesn't work as\nexpected.\n\n[issue]: https://github.com/tebeka/selenium/issues/new\n\nBelow are known issues that affect the usage of this API. There are likely\nothers filed on the respective issue trackers.\n\n### Selenium 2\n\nNo longer supported.\n\n### Selenium 3\n\n1.  [Selenium 3 NewSession does not implement the W3C-specified parameters](https://github.com/SeleniumHQ/selenium/issues/2827).\n\n### Geckodriver (Standalone)\n\n1.  [Geckodriver does not support the Log API](https://github.com/mozilla/geckodriver/issues/284)\n    because it\n    [hasn't been defined in the spec yet](https://github.com/w3c/webdriver/issues/406).\n2.  Firefox via Geckodriver (and also through Selenium)\n    [doesn't handle clicking on an element](https://github.com/mozilla/geckodriver/issues/1007).\n3.  Firefox via Geckodriver doesn't handle sending control characters\n    [without appending a terminating null key](https://github.com/mozilla/geckodriver/issues/665).\n\n### Chromedriver\n\n1. [Headless Chrome does not support running extensions](https://crbug.com/706008).\n\n## Breaking Changes\n\nThere are a number of upcoming changes that break backward compatibility in an\neffort to improve and adapt the existing API. They are listed here:\n\n### 22 August 2017\n\nThe `Version` constant was removed as it is unused.\n\n### 18 April 2017\n\nThe Log method was changed to accept a typed constant for the type of log to\nretrieve, instead of a raw string. The return value was also changed to provide\na more idiomatic type.\n\n## Hacking\n\nPatches are encouraged through GitHub pull requests. Please ensure that:\n\n1.  A test is added for anything more than a trivial change and that the\n    existing tests pass. See below for instructions on setting up your test\n    environment.\n2.  Please ensure that `gofmt` has been run on the changed files before\n    committing. Install a pre-commit hook with the following command:\n\n    $ ln -s ../../misc/git/pre-commit .git/hooks/pre-commit\n\nSee [the issue tracker][issues] for features that need implementing.\n\n[issues]: https://github.com/tebeka/selenium/issues\n\n### Testing Locally\n\nInstall `xvfb` and Java if they is not already installed, e.g.:\n\n    sudo apt-get install xvfb openjdk-11-jre\n\nRun the tests:\n\n    $ go test\n\n*   There is one top-level test for each of:\n\n    1.  Chromium and ChromeDriver.\n    2.  A new version of Firefox and Selenium 3.\n    3.  HTMLUnit, a Java-based lightweight headless browser implementation.\n    4.  A new version of Firefox directly against Geckodriver.\n\n    There are subtests that are shared between both top-level tests.\n\n*   To run only one of the top-level tests, pass one of:\n\n    *   `-test.run=TestFirefoxSelenium3`,\n    *   `-test.run=TestFirefoxGeckoDriver`,\n    *   `-test.run=TestHTMLUnit`, or\n    *   `-test.run=TestChrome`.\n\n    To run a specific subtest, pass `-test.run=Test\u003cBrowser\u003e/\u003csubtest\u003e` as\n    appropriate. This flag supports regular expressions.\n\n*   If the Chrome or Firefox binaries, the Selenium JAR, the Geckodriver binary,\n    or the ChromeDriver binary cannot be found, the corresponding tests will be\n    skipped.\n\n*   The binaries and JAR under test can be configured by passing flags to `go\n    test`. See the available flags with `go test --arg --help`.\n\n*   Add the argument `-test.v` to see detailed output from the test automation\n    framework.\n\n### Testing With Docker\n\nTo ensure hermeticity, we also have tests that run under Docker. You will need\nan installed and running Docker system.\n\nTo run the tests under Docker, run:\n\n    $ go test --docker\n\nThis will create a new Docker container and run the tests in it. (Note: flags\nsupplied to this invocation are not curried through to the `go test` invocation\nwithin the Docker container).\n\nFor debugging Docker directly, run the following commands:\n\n    $ docker build -t go-selenium testing/\n    $ docker run --volume=$(pwd):/code --workdir=/code -it go-selenium bash\n    root@6c7951e41db6:/code# testing/docker-test.sh\n    ... lots of testing output ...\n\n### Testing With Sauce Labs\n\nTests can be run using a browser located in the cloud via Sauce Labs.\n\nTo run the tests under Sauce, run:\n\n    $ go test --test.run=TestSauce --test.timeout=20m \\\n      --experimental_enable_sauce \\\n      --sauce_user_name=[username goes here] \\\n      --sauce_access_key=[access key goes here]\n\nThe Sauce access key can be obtained via\n[the Sauce Labs user settings page](https://saucelabs.com/beta/user-settings).\n\nTest results can be viewed through the\n[Sauce Labs Dashboard](https://saucelabs.com/beta/dashboard/tests).\n\n## License\n\nThis project is licensed under the [MIT][mit] license.\n\n[mit]: https://raw.githubusercontent.com/tebeka/selenium/master/LICENSE\n","funding_links":[],"categories":["Links Úteis","Go","语言资源库","Resources"],"sub_categories":["Em Português","go"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftebeka%2Fselenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftebeka%2Fselenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftebeka%2Fselenium/lists"}