# go-webdriver **Repository Path**: laogg/go-webdriver ## Basic Information - **Project Name**: go-webdriver - **Description**: WEBDRIVER https://github.com/mediabuyerbot/go-webdriver.git - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-20 - **Last Updated**: 2022-05-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # go-webdriver [![Coverage Status](https://coveralls.io/repos/github/mediabuyerbot/go-webdriver/badge.svg?branch=master&t7)](https://coveralls.io/github/mediabuyerbot/go-webdriver?branch=master) ## Work in progress... ## Contents - [Installation](#installation) - [Commands](#commands) + [Build dependencies](#build-dependencies) + [Run test](#run-test) + [Run test with coverage profile](#run-test-with-coverage-profile) + [Run integration test](#run-integration-test) + [Run sync coveralls](#run-sync-coveralls) + [Build mocks](#build-mocks) + [Download ChromeDriver, GeckoDriver](#download-chromedriver-geckodriver-third_partydrivers) - [ChromeOptions docs](#chromeoptions-docs) - [FirefoxOptions docs](#firefoxoptions-docs) - [Protocol implementation](#protocol-implementation) + [Session](#session) + [Timeouts](#timeouts) + [Navigation](#navigation) + [Context](#context) + [Cookies](#cookies) + [Document](#document) + [Screen capture](#screen-capture) + [User prompts](#user-prompts) + [Elements](#elements) ### Installation ```ssh go get github.com/mediabuyerbot/go-webdriver ``` ### Commands #### Build dependencies ```shell script make deps ``` #### Run test ```shell script make test ``` #### Run test with coverage profile ```shell script make covertest ``` #### Run integration test ```shell script make integration ``` #### Run sync coveralls ```shell script COVERALLS_GO_WEBDRIVER_TOKEN=${COVERALLS_REPO_TOKEN} make sync-coveralls ``` #### Build mocks ```shell script make mocks ``` #### Download ChromeDriver, GeckoDriver third_party/drivers ```shell script make download-drivers ``` ## ChromeOptions docs + [V8 dev](https://v8.dev/) + [Chromium command line switches](https://peter.sh/experiments/chromium-command-line-switches/) + [Chromium command line switches](https://chromium.googlesource.com/chromium/src/+/master/chrome/common/chrome_switches.cc) + [Chromium command line prefs name](https://chromium.googlesource.com/chromium/src/+/master/chrome/common/pref_names.cc) ## FirefoxOptions docs TODO ## Protocol implementation ### Session | Specification | Example | Chrome | Firefox | | ----------------------------------------------------------------------------- |-------- | :------------:| :-------:| | [New Session](https://w3c.github.io/webdriver/#new-session) | | ✓ | ✓ | | [Delete Session](https://w3c.github.io/webdriver/#delete-session) | | ✓ | ✓ | | [Status](https://w3c.github.io/webdriver/#status) | | ✓ | ✓ | ### Timeouts | Specification | Example | Chrome | Firefox | | ----------------------------------------------------------------------------- |-------- | :------------:| :-------:| | [Get Timeouts](https://w3c.github.io/webdriver/#get-timeouts) | | ✓ | ✓ | | [Set Timeouts](https://w3c.github.io/webdriver/#set-timeouts) | | ✓ | ✓ | ### Navigation | Specification | Example | Chrome | Firefox | | ----------------------------------------------------------------------------- | ------------- | :------------:| :-------:| | [Navigate To](https://w3c.github.io/webdriver/#navigate-to) | | ✓ | ✓ | | [Get Current URL](https://w3c.github.io/webdriver/#get-current-url) | | ✓ | ✓ | | [Back](https://w3c.github.io/webdriver/#back) | | ✓ | ✓ | | [Forward](https://w3c.github.io/webdriver/#forward) | | ✓ | ✓ | | [Refresh](https://w3c.github.io/webdriver/#refresh) | | ✓ | ✓ | | [Get Title](https://w3c.github.io/webdriver/#get-title) | | ✓ | ✓ | ### Context | Specification | Example | Chrome | Firefox | | ----------------------------------------------------------------------------- | ------------- | :------------:| :-------:| | [Get Window Handle](https://w3c.github.io/webdriver/#get-window-handle) | | ✓ | ✓ | | [Close Window](https://w3c.github.io/webdriver/#close-window) | | ✓ | ✓ | | [Switch To Window](https://w3c.github.io/webdriver/#switch-to-window) | | ✓ | ✓ | | [Get Window Handles](https://w3c.github.io/webdriver/#get-window-handles) | | ✓ | ✓ | | [New Window](https://w3c.github.io/webdriver/#new-window) | | ✓ | ✓ | | [Switch To Frame](https://w3c.github.io/webdriver/#switch-to-frame) | | ✓ | ✓ | | [Switch To Parent Frame](https://w3c.github.io/webdriver/#switch-to-parent-frame)| | ✓ | ✓ | | [Get Window Rect](https://w3c.github.io/webdriver/#get-window-rect) | | ✓ | ✓ | | [Set Window Rect](https://w3c.github.io/webdriver/#set-window-rect) | | ✓ | ✓ | | [Maximize Window](https://w3c.github.io/webdriver/#maximize-window) | | ✓ | ✓ | | [Minimize Window](https://w3c.github.io/webdriver/#minimize-window) | | ✓ | ✓ | | [Fullscreen Window](https://w3c.github.io/webdriver/#fullscreen-window) | | ✓ | ✓ | ### Cookies | Specification | Example | Chrome | Firefox | | ----------------------------------------------------------------------------- | ------------- | :------------:| :-------:| | [Get All Cookies](https://w3c.github.io/webdriver/#get-all-cookies) | | ✓ | ✓ | | [Get Named Cookie](https://w3c.github.io/webdriver/#get-named-cookie) | | ✓ | ✓ | | [Add Cookie](https://w3c.github.io/webdriver/#add-cookie) | | ✓ | ✓ | | [Delete Cookie](https://w3c.github.io/webdriver/#delete-cookie) | | ✓ | ✓ | | [Delete All Cookies](https://w3c.github.io/webdriver/#delete-all-cookies) | | ✓ | ✓ | ### Document | Specification | Example | Chrome | Firefox | | ----------------------------------------------------------------------------- | ------------- | :------------:| :-------:| | [Get Page Source](https://w3c.github.io/webdriver/#get-page-source) | | ✓ | ✓ | | [Execute Script](https://w3c.github.io/webdriver/#execute-script) | | ✓ | ✓ | | [Execute Async Script](https://w3c.github.io/webdriver/#execute-async-script) | | ✓ | ✓ | ### Screen capture | Specification | Example | Chrome | Firefox | | ----------------------------------------------------------------------------- | ------------- | :------------:| :-------:| | [Take Screenshot](https://w3c.github.io/webdriver/#take-screenshot) | | ✓ | ✓ | | [Take Element Screenshot](https://w3c.github.io/webdriver/#take-element-screenshot) | | ✓ | ✓ | ### User prompts | Specification | Example | Chrome | Firefox | | ----------------------------------------------------------------------------- | ------------- | :------------:| :-------:| | [Dismiss Alert](https://w3c.github.io/webdriver/#dismiss-alert) | | ✓ | ✓ | | [Accept Alert](https://w3c.github.io/webdriver/#accept-alert) | | ✓ | ✓ | | [Get Alert Text](https://w3c.github.io/webdriver/#get-alert-text) | | ✓ | ✓ | | [Send Alert Text](https://w3c.github.io/webdriver/#send-alert-text) | | ✓ | ✓ | ### Elements | Specification | Example | Chrome | Firefox | | ----------------------------------------------------------------------------- | ------------- | :------------:| :-------:| | [Find Element](https://w3c.github.io/webdriver/#find-element) | | ✓ | ✓ | | [Find Elements](https://w3c.github.io/webdriver/#find-elements) | | ✓ | ✓ | | [Find Element From Element](https://w3c.github.io/webdriver/#find-element-from-element) | | ✓ | ✓ | | [Find Elements From Element](https://w3c.github.io/webdriver/#find-elements-from-element) | | ✓ | ✓ | | [Get Active Element](https://w3c.github.io/webdriver/#get-active-element) | | ✓ | ✓ | | [Is Element Selected](https://w3c.github.io/webdriver/#is-element-selected) | | ✓ | ✓ | | [Get Element Attribute](https://w3c.github.io/webdriver/#get-element-attribute) | | ✓ | ✓ | | [Get Element Property](https://w3c.github.io/webdriver/#get-element-property) | | ✓ | ✓ | | [Get Element CSS Value](https://w3c.github.io/webdriver/#get-element-css-value) | | ✓ | ✓ | | [Get Element Text](https://w3c.github.io/webdriver/#get-element-text) | | ✓ | ✓ | | [Get Element Tag Name](https://w3c.github.io/webdriver/#get-element-tag-name) | | ✓ | ✓ | | [Get Element Rect](https://w3c.github.io/webdriver/#get-element-rect) | | ✓ | ✓ | | [Element Enabled](https://w3c.github.io/webdriver/#is-element-enabled) | | ✓ | ✓ | | [Element Click](https://w3c.github.io/webdriver/#element-click) | | ✓ | ✓ | | [Element Clear](https://w3c.github.io/webdriver/#element-clear) | | ✓ | ✓ | | [Element Send Keys](https://w3c.github.io/webdriver/#element-send-keys) | | ✓ | ✓ |