-
Notifications
You must be signed in to change notification settings - Fork 583
Quick Start
Anthony Drogon edited this page Aug 28, 2024
·
29 revisions
How to start?
For Maven users:
Add these lines to file pom.xml:
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>7.4.2</version>
<scope>test</scope>
</dependency>
For Gradle users:
Add these lines to file build.gradle:
dependencies {
testImplementation 'com.codeborne:selenide:7.4.2'
}
Import the following methods:
import static com.codeborne.selenide.Selenide.*;
import static com.codeborne.selenide.Condition.*;
And start writing UI Tests!
@Test
public void userCanLoginByUsername() {
open("/login");
$(By.name("username")).setValue("johny");
$("#submit").click();
$(".success-message").shouldHave(text("Hello, Johny!"));
}
You can find some Selenide usages in the example project Hangman.
There is also a separate project with examples of Selenide usages: [selenide-examples] (https://github.com/selenide-examples)