Changes in Selenide 2.25

✓ Selenium 3.0.0 ✓ Java 8


Changes in Selenide 2.25

the last of 2.*

Good evening!

Today we released Selenide 2.25. It’s the last Selenide version in 2.* line. A big refactoring, clean-up of deprecated stuff and Selenide 3.0 follows soon.

Please review your tests and be sure you don’t use any @Deprecated methods. We are going to remove them in Selenide 3.0.

But now - Selenide 2.25 highlights:

We added “Selenide profiler” for TestNG

You probably know that Selenide suggests a profiler for your tests named PrettyReportCreator. It was only available for JUnit until now. Now we created the same profiler for TestNG.

By the way, we renamed it to TextReport.

To use profiler with JUnit:

  public TestRule report = new TextReport();

To use profiler with TestNG:

  public class GoogleTestNGTest {

We added methods $$.first() and $$.last()

Now it’s easy to get the first and the last elements of a collection:

  $$("#employees .fired").first().shouldHave(text("Steve Jobs"));
  $$("#employees .fired").last().shouldHave(text("Richard Williamson"));

We added method Screenshots.getLastScreenshot()

It returns the last screenshot taken by Selenide. It’s can be useful for those who wants to integrate Selenide with reporting frameworks like Allure.

By the way, we renamed method getScreenShotAsFile() to takeScreenShotAsFile(), because the former name was wrong: this method does take a screenshot, not only returns a screenshot.

We added methods Selenide.confirm() and Selenide.dismiss()

For handling modal dialogs, Selenide had methods confirm(String) and dismiss(String) with parameter - expected dialog text.

  confirm("Are you sure you want to remove file?");
  dismiss("Are you sure you want to remove file?");

These methods click “ok” or “cancel” in a modal dialog “confirm” and check the dialog’s text.

But sometimes you don’t need to check the text. That’s why we added parameterless methods confirm() and dismiss():

  String text = confirm();
  String text = dismiss();

these methods do not check, but return dialog text.

We added option -Dselenide.reopenBrowserOnFail

By default Selenide tries to re-open browser if it died. It seems to be a good idea: one test fails, but the following tests will continue running.

But sometimes you want to avoid re-opening the browser and let all other tests fail.

In this case just use the new option: -Dselenide.reopenBrowserOnFail=false

Upgraded to htmlunit 2.19

Some folks think that HtmlUnit is died, but we still like it. At least tests of Selenide itself run stably on HtmlUnit.

Changed Selenide license MIT

We wrote about license in a separate post, but shortly said - MIT license is the most permissive. We hope that some bureaucratic companies who are afraid of “GPL” characters can now start using Selenide.


And what’s up with you?

Andrei Solntsev

blog comments powered by Disqus

The project is maintained by