Selenide: concise UI tests in Java

125 views
Skip to first unread message

mr. Selenide

unread,
Jan 9, 2014, 4:10:21 PM1/9/14
to seleniu...@googlegroups.com
Hi all!
I would like to introduce you Selenide - a nice library for writing UI Tests in Java.

Technically, Selenide is a wrapper around Selenium that allows you writing expressive, readable and stable tests. 
With Selenide you don't need to:
  • bother about creating/closing WebDriver and passing it around.
  • Put a lot of "waits" and "sleeps" in your tests hoping to overcome timing problems. Selenide resolves most of Ajax issues automagically.
  • Copy-paste code from internet to take screenshots
  • etc.
The is an example of test with Selenide:
@Test
public void userCanLoginByUsername() {
  open("/login");
  $(By.name("user.name")).setValue("johny");
  $("#submit").click();
  $(".loading_progress").should(disappear); // Waits until element disappears
  $("#username").shouldHave(text("Hello, Johny!")); // Waits until element gets text
}

Just for fun, please enjoy the following 30 seconds demonstration of Selenide: Selenide Harlem Shake

You can find more information about Selenide on the official site.
In the latest issue of Method&Tools magazine there is an article about Selenide. 

Please feel free to share you feedback about Selenide!

Andrei Solntsev

David Lai

unread,
Jan 10, 2014, 8:40:46 PM1/10/14
to seleniu...@googlegroups.com
Looks very jQueryesk in syntax.

That's pretty cool.  Are those real jQuery selectors or just css?  Is it possible to use other selector types?  

Also, is it possible to remap the '$' object.  That's commonly used as an alias by some localization libraries.  Would make cross language tests harder.

mr. Selenide

unread,
Aug 8, 2014, 2:45:44 PM8/8/14
to seleniu...@googlegroups.com
Hi David!
Thanks for your feedback!

1. These are just CSS selectors.
2. Yes, it's possible to use any other selectors provided by Selenium Webdriver. Just use $(By.name("fname")).
3. Yes, it's possible to remap the '$' object. Actually '$' is just an alias for the "getElement" method. Your can define own method with name "ANYTHING" that just calls "Selenide.getElement".

Feel free to ask questions!

суббота, 11 января 2014 г., 3:40:46 UTC+2 пользователь David Lai написал:

Robin Gupta

unread,
Aug 8, 2014, 11:39:10 PM8/8/14
to seleniu...@googlegroups.com
In Facebook terms: Like :)
Reply all
Reply to author
Forward
0 new messages