Skip to content

Commit ce5dd79

Browse files
committed
add setup to readme
1 parent 9301596 commit ce5dd79

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,28 @@ driver.findElements(ByTitle("title 1"))
1818
There are unit tests that [illustrate](https://medium.com/codex/towards-self-documenting-code-371364bdccbb)
1919
all the usages.
2020

21+
## Setup
22+
23+
I'm temporarily using JitPack while I learn how to publish to Maven Central.
24+
25+
Add JitPack repository:
26+
27+
```kotlin
28+
repositories {
29+
mavenCentral()
30+
maven { url = uri("https://jitpack.io") }
31+
}
32+
```
33+
34+
Add dependency:
35+
36+
````kotlin
37+
testImplementation("com.github.lsoares:selenium-testing-library:63c3355a76")
38+
````
39+
40+
You can check the latest hash at the [corresponding JitPack page](https://jitpack.io/#lsoares/selenium-testing-library)
41+
→ commits
42+
2143
## Why?
2244

2345
I'm a fan of the [Testing Library](http://testing-library.com/).
@@ -34,8 +56,7 @@ How do I have the Testing Library in Selenium? By dynamically injecting it throu
3456
The injected JavaScript was copied from
3557
the [Testing Playground Chrome extension](https://chrome.google.com/webstore/detail/testing-playground/hejbmebodbijjdhflfknehhcgaklhano)
3658
.
37-
(There are some CDKs that serve the Testing Library,
38-
but I needed the self-contained single-file browser-ready version.)
59+
There are some CDKs that serve the Testing Library, but I needed the self-contained single-file browser-ready version.
3960

4061
### Port or Adapt?
4162

@@ -47,7 +68,7 @@ It turned out this was a limited approach because:
4768
- I'd likely introduce bugs
4869
- I wouldn't get library updates easily
4970

50-
(check git history to view the old approach)
71+
Check git history to view the old approach.
5172

5273
With the new approach (an adapter/wrapper), I learned a lot about Selenium, the Testing Library, and publishing a Kotlin
5374
library.
@@ -58,6 +79,5 @@ library.
5879
- Normalizer function
5980
- Search function
6081

61-
## Other
62-
82+
---
6383
There's a [Python version](https://github.com/anze3db/selenium-testing-library).

0 commit comments

Comments
 (0)