Skip to content

Commit 08c2949

Browse files
committed
Misc doc changes
Besides other documentation changes, this commit includes all relevant documents to the generated HTML doc for HexDocs.pm and leverages on latest features of ExDoc.
1 parent 8dc46a3 commit 08c2949

File tree

8 files changed

+64
-30
lines changed

8 files changed

+64
-30
lines changed

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
# Changelog
22

3-
## 0.2 - 2021-09-13
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## v0.2.0 - 2021-09-13
411

512
* Increases minimum elixir version to 1.8.
613
* Relaxes tesla version requirement to ~> 1.3.
714

8-
## 0.1 - 2020-04-15
15+
## v0.1.0 - 2020-04-15
916

10-
Initial release.
17+
* Initial release.

LICENSE renamed to LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MIT License
1+
# The MIT License
22

33
Copyright (c) 2020 Aaron Renner
44

README.md

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# WebDriverClient
2-
[![codecov](https://codecov.io/gh/aaronrenner/web_driver_client/branch/master/graph/badge.svg)](https://codecov.io/gh/aaronrenner/web_driver_client)
2+
3+
[![CI](https://github.com/elixir-wallaby/web_driver_client/actions/workflows/test.yml/badge.svg)](https://github.com/elixir-wallaby/web_driver_client/actions/workflows/test.yml)
4+
[![codecov](https://codecov.io/gh/elixir-wallaby/web_driver_client/branch/master/graph/badge.svg)](https://codecov.io/gh/elixir-wallaby/web_driver_client)
5+
[![Module Version](https://img.shields.io/hexpm/v/web_driver_client.svg)](https://hex.pm/packages/web_driver_client)
6+
[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/web_driver_client/)
7+
[![Total Download](https://img.shields.io/hexpm/dt/web_driver_client.svg)](https://hex.pm/packages/web_driver_client)
8+
[![License](https://img.shields.io/hexpm/l/web_driver_client.svg)](https://github.com/elixir-wallaby/web_driver_client/blob/master/LICENSE.md)
9+
[![Last Updated](https://img.shields.io/github/last-commit/elixir-wallaby/web_driver_client.svg)](https://github.com/elixir-wallaby/web_driver_client/commits/master)
10+
11+
312

413
A low-level [WebDriver] client for Elixir. This library is still a work in progress.
514

@@ -167,23 +176,24 @@ $ mix test --only integration_test_driver:selenium_2
167176
Sometimes it's nice to be able to run against a remote webdriver server.
168177
Here's an example that runs the tests against a docker container.
169178

170-
1. Start the docker container for the webdriver server
179+
Start the docker container for the webdriver server:
171180

172-
```
173-
$ docker run -p 4446:4444 --shm-size=2g selenium/standalone-chrome:3
174-
```
181+
```
182+
$ docker run -p 4446:4444 --shm-size=2g selenium/standalone-chrome:3
183+
```
175184

176-
2. Run the tests
185+
Run the tests:
177186

178-
```
179-
$ SELENIUM_3_BASE_URL="http://localhost:4446/wd/hub" TEST_SERVER_HOSTAME="host.docker.internal" mix test --only integration_test_driver_browser:selenium_3-chrome
180-
```
187+
```
188+
$ SELENIUM_3_BASE_URL="http://localhost:4446/wd/hub" \
189+
TEST_SERVER_HOSTAME="host.docker.internal" mix test --only integration_test_driver_browser:selenium_3-chrome
190+
```
181191

182-
The environment variables work like this:
192+
The environment variables work like this:
183193

184-
* `<DRIVER_NAME>_BASE_URL` - The base url for the webdriver server to run
194+
* `<DRIVER_NAME>_BASE_URL` - The base url for the webdriver server to run
185195
against. Can also use `WEBDRIVER_BASE_URL` to set this across all scenarios.
186-
* ` TEST_SERVER_HOSTNAME` - The hostname the webdriver server should use to access
196+
* ` TEST_SERVER_HOSTNAME` - The hostname the webdriver server should use to access
187197
the machine that's running the test suite.
188198

189199
The test suite starts up a test HTTP server, but when using a remote webdriver
@@ -194,8 +204,8 @@ Here's an example that runs the tests against a docker container.
194204

195205
## Installation
196206

197-
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
198-
by adding `web_driver_client` to your list of dependencies in `mix.exs`:
207+
The package can be installed by adding `:web_driver_client` to your list of
208+
dependencies in `mix.exs`:
199209

200210
```elixir
201211
def deps do
@@ -232,3 +242,10 @@ may change at any time.
232242
[W3C]: https://w3c.github.io/webdriver/
233243
[Wallaby]: https://github.com/elixir-wallaby/wallaby
234244
[Hound]: https://github.com/HashNuke/hound
245+
246+
## Copyright and License
247+
248+
Copyright (c) 2020 Aaron Renner
249+
250+
This work is free. You can redistribute it and/or modify it under the
251+
terms of the MIT License. See the [LICENSE.md](./LICENSE.md) file for more details.

lib/web_driver_client/json_wire_protocol_client.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ defmodule WebDriverClient.JSONWireProtocolClient do
309309
end
310310

311311
@doc """
312-
Fetchs the attribute value of an element
312+
Fetches the attribute value of an element
313313
314314
Specification: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidelementidattributename
315315
"""

mix.exs

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
defmodule WebDriverClient.MixProject do
22
use Mix.Project
33

4+
@source_url "https://github.com/elixir-wallaby/web_driver_client"
45
@version "0.2.0"
56

67
def project do
@@ -47,7 +48,7 @@ defmodule WebDriverClient.MixProject do
4748
{:excoveralls, "~> 0.10", only: :test},
4849
{:credo, "~> 1.4.0", only: [:dev, :test], runtime: false},
4950
{:dialyxir, "~> 1.1.0", only: [:dev], runtime: false},
50-
{:ex_doc, "~> 0.20", only: [:docs, :docs_prerelease]}
51+
{:ex_doc, ">= 0.0.0", only: [:docs, :docs_prerelease]}
5152
]
5253
end
5354

@@ -63,7 +64,15 @@ defmodule WebDriverClient.MixProject do
6364

6465
defp docs do
6566
[
66-
main: "WebDriverClient",
67+
extras: [
68+
"CHANGELOG.md": [],
69+
"LICENSE.md": [title: "License"],
70+
"README.md": [title: "Overview"]
71+
],
72+
main: "readme",
73+
source_url: @source_url,
74+
source_ref: "v#{@version}",
75+
formatters: ["html"],
6776
groups_for_modules: [
6877
"Main API": [
6978
WebDriverClient,
@@ -99,17 +108,18 @@ defmodule WebDriverClient.MixProject do
99108
Elements: &(&1[:subject] == :elements),
100109
Alerts: &(&1[:subject] == :alerts),
101110
Logging: &(&1[:subject] == :logging)
102-
],
103-
source_ref: "v#{@version}",
104-
source_url: "https://github.com/aaronrenner/web_driver_client"
111+
]
105112
]
106113
end
107114

108115
defp package do
109116
[
110117
maintainers: ["Aaron Renner", "Michał Łępicki"],
111118
licenses: ["MIT"],
112-
links: %{github: "https://github.com/aaronrenner/web_driver_client"}
119+
links: %{
120+
Changelog: "https://hexdocs.pm/web_driver_client/changelog.html",
121+
GitHub: @source_url
122+
}
113123
]
114124
end
115125
end

mix.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"credo": {:hex, :credo, "1.4.0", "92339d4cbadd1e88b5ee43d427b639b68a11071b6f73854e33638e30a0ea11f5", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "1fd3b70dce216574ce3c18bdf510b57e7c4c85c2ec9cad4bff854abaf7e58658"},
88
"dialyxir": {:hex, :dialyxir, "1.1.0", "c5aab0d6e71e5522e77beff7ba9e08f8e02bad90dfbeffae60eaf0cb47e29488", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "07ea8e49c45f15264ebe6d5b93799d4dd56a44036cf42d0ad9c960bc266c0b9a"},
99
"earmark": {:hex, :earmark, "1.4.3", "364ca2e9710f6bff494117dbbd53880d84bebb692dafc3a78eb50aa3183f2bfd", [:mix], [], "hexpm", "8cf8a291ebf1c7b9539e3cddb19e9cef066c2441b1640f13c34c1d3cfc825fec"},
10-
"earmark_parser": {:hex, :earmark_parser, "1.4.16", "607709303e1d4e3e02f1444df0c821529af1c03b8578dfc81bb9cf64553d02b9", [:mix], [], "hexpm", "69fcf696168f5a274dd012e3e305027010658b2d1630cef68421d6baaeaccead"},
10+
"earmark_parser": {:hex, :earmark_parser, "1.4.18", "e1b2be73eb08a49fb032a0208bf647380682374a725dfb5b9e510def8397f6f2", [:mix], [], "hexpm", "114a0e85ec3cf9e04b811009e73c206394ffecfcc313e0b346de0d557774ee97"},
1111
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
12-
"ex_doc": {:hex, :ex_doc, "0.25.3", "3edf6a0d70a39d2eafde030b8895501b1c93692effcbd21347296c18e47618ce", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "9ebebc2169ec732a38e9e779fd0418c9189b3ca93f4a676c961be6c1527913f5"},
12+
"ex_doc": {:hex, :ex_doc, "0.26.0", "1922164bac0b18b02f84d6f69cab1b93bc3e870e2ad18d5dacb50a9e06b542a3", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "2775d66e494a9a48355db7867478ffd997864c61c65a47d31c4949459281c78d"},
1313
"excoveralls": {:hex, :excoveralls, "0.14.3", "d17dc249ad32e469afd2bc656b58e810109d4367ec6bd467bed57a84dc4a3e02", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "b5aecdfdcf48e9d5e1c210841589b30981a5e7e66055cb8691a6f90b1601c108"},
1414
"hackney": {:hex, :hackney, "1.18.0", "c4443d960bb9fba6d01161d01cd81173089686717d9490e5d3606644c48d121f", [:rebar3], [{:certifi, "~>2.8.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "9afcda620704d720db8c6a3123e9848d09c87586dc1c10479c42627b905b5c5e"},
1515
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
@@ -20,7 +20,7 @@
2020
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
2121
"mime": {:hex, :mime, "1.6.0", "dabde576a497cef4bbdd60aceee8160e02a6c89250d6c0b29e56c0dfb00db3d2", [:mix], [], "hexpm", "31a1a8613f8321143dde1dafc36006a17d28d02bdfecb9e95a880fa7aabd19a7"},
2222
"mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"},
23-
"nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"},
23+
"nimble_parsec": {:hex, :nimble_parsec, "1.2.0", "b44d75e2a6542dcb6acf5d71c32c74ca88960421b6874777f79153bbbbd7dccc", [:mix], [], "hexpm", "52b2871a7515a5ac49b00f214e4165a40724cf99798d8e4a65e4fd64ebd002c1"},
2424
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
2525
"plug": {:hex, :plug, "1.8.3", "12d5f9796dc72e8ac9614e94bda5e51c4c028d0d428e9297650d09e15a684478", [:mix], [{:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "164baaeb382d19beee0ec484492aa82a9c8685770aee33b24ec727a0971b34d0"},
2626
"plug_cowboy": {:hex, :plug_cowboy, "2.1.0", "b75768153c3a8a9e8039d4b25bb9b14efbc58e9c4a6e6a270abff1cd30cbe320", [:mix], [{:cowboy, "~> 2.5", [hex: :cowboy, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "6cd8ddd1bd1fbfa54d3fc61d4719c2057dae67615395d58d40437a919a46f132"},

test/web_driver_client/w3c_wire_protocol_client_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,7 @@ defmodule WebDriverClient.W3CWireProtocolClientTest do
20642064
end
20652065

20662066
defp build_start_session_payload do
2067-
%{"capablities" => %{"browserName" => "firefox"}}
2067+
%{"capabilities" => %{"browserName" => "firefox"}}
20682068
end
20692069

20702070
defp string_to_type do

test/web_driver_client_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ defmodule WebDriverClientTest do
16991699
end
17001700

17011701
defp build_start_session_payload do
1702-
%{"capablities" => %{"browserName" => "firefox"}}
1702+
%{"capabilities" => %{"browserName" => "firefox"}}
17031703
end
17041704

17051705
defp stub_bypass_response(bypass, response) do

0 commit comments

Comments
 (0)