-
Notifications
You must be signed in to change notification settings - Fork 586
Quick Start
Roman Isko edited this page Dec 26, 2015
·
29 revisions
How to start?
Just put actual selenide.jar to your project.
For Maven users:
Add these lines to file pom.xml:
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>
For Ivy users:
Add these lines to file ivy.xml:
<ivy-module>
<dependencies>
<dependency org="com.codeborne" name="selenide" rev="3.0"/>
</dependencies>
</ivy-module>
For Gradle users:
Add these lines to file build.gradle:
dependencies {
testCompile 'com.codeborne:selenide:3.0'
}
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)