kotlin + selenide = kotlenide
❤️
Usage (TODO)
idiomatic kotlin DSL for UI ent-to-end testing, which is using famous good known selenide under the hood:
class `Awesome Kotlenide Tests` {
@Test fun `selenide using idiomatic kotlin should be awesome`() {
"https://google.com".open {
find("body") {
this contains "G"
this has "mail"
close()
}
}
}
@Test fun `should open given URL in chrome and assert using infix extension functions`() {
"https://google.com".open("chrome") {
find("body") {
this.find(".ololo") shouldNotBe exist
find(".trololo") shouldBeNot visible
this shouldHaveText "Gmail"
close()
}
}
}
}
Read project reference documentation to learn more
Installation
TODO: kotlenide is available in both — maven central
and bintray jcenter
repositories
Note
|
Kotlenide itself is not included any selenide library, so we assume you already have one in your project dependencies. Otherwise — just add some together with kotlenide… |
dependencies {
testImplementation 'com.github.daggerok:kotlenide:0.0.2'
// Kotlenide also requires Selenide dependency:
testImplementation 'com.codeborne:selenide:4.14.1'
}
<project>
<dependencies>
<dependency>
<groupId>com.github.daggerok</groupId>
<artifactId>kotlenide</artifactId>
<version>0.0.2</version>
<scope>test</scope>
</dependency>
<!-- Kotlenide also requires Selenide dependency: -->
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>4.14.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>