Released Selenide 6.14.0

Released Selenide 6.14.0

Full speed ahead!
08.05.23

Good evening!

Good news: we have released Selenide 6.14.0.

It contains some changes that look minor, but might break something in your tests. That’s why I highly recommend to upgrade now

Speed up debugging

When you are debugging a test and stop at a breakpoint, sometimes IDE is rendering very slowly page object fields. In this state IDE can hang for quite a long time:

Selenide. debug. slow.

The reason is that Selenide makes multiple webdriver calls trying to get elements’ tag names, texts and attributes. As a result, you will see the most actual detailed information after some time:

Selenide. debug. slow. result.

Now this process will be significantly faster. Selenide will not call webdriver anymore, but just show locator:

Selenide. debug. slow. result.

But be informed that format of $.toString() / $$.toString() will change. Who knows, probably it might break your tests.

See issue 2253. and PR 2269.

But don’t worry, it’s all only about debugging. In case of test failure, you will still receive the full element information with blackjack and screenshooters.


Removed Chrome argument --no-sandbox

I personally don’t see any difference, whether I run tests with or without this argument.

But

  1. Some users complain that Chrome cannot start in Docker without argument --no-sandbox;
  2. Other users complain that Chrome, when started with argument --no-sandbox, doesn’t stop - and chrome process hangs forever in background and eats CPU. But it seems to happen only on Windows (?)

After years of hesitations, we decided to remove this argument --no-sandbox by default. Users of type #1

  • can easily detect the problem (chrome wont start)
  • can easily add this argument in their tests:
    Configuration.browserCapabilities = 
      new ChromeOptions().addArguments("--no-sandbox");
    

See issue 2270 and PR 2271.


Added method step for reports

If you use Selenide built-in report (TextReport), now you can group actions using new method step:

@Test
void authentication() {
  step("login",()->{
    open("/login.asp");
    $("#username").val("u");
    $("#password").val("p");
  });

  step("logout",()->{
    $("#logout").click();
    $("#goodBye").shouldHave(text("Good bye looser!"));
  });
}

These “steps” will be visually distinguished in the report:

+---------------+-----------------------------------------------+-------+------+
| Element       |Subject                                        |Status | ms.  |
+---------------+-----------------------------------------------+-------+------+
| login         |                                               |PASS   | 4000 |
|    open       | http://127.0.0.1:8080/my_account/account.html |PASS   | 2662 |
|    #username  | val "u"                                       |PASS   | 300  |
|    #password  | val "p"                                       |PASS   | 400  |
| logout        |                                               |PASS   | 1023 |
|    #logout    | click                                         |PASS   | 923  |
|    #goodBye   | should have text "Good bye looser!"           |PASS   | 100  |
+---------------+-----------------------------------------------+-------+------+

By the way, those steps can be embedded into each other.

See issue 2172. Thanks to Maksim @Au6ojlut for PR 2250.


Added method $.dragAndDrop(DragAndDropOptions) with options

Now method $.dragAndDrop acquired a more logical sound: first “what”, then “where” and finally, “how”.

$("#drag1").dragAndDrop(to("#div2"));
$("#drag1").dragAndDrop(to("#div2").usingJS());

Thanks to Maksim @Au6ojlut for PR 2245.


Allow to set browser position out of screen

We fixed a minor bug that didn’t allow setting negative values to browser position:

Configuration.browserPosition = "-1900x-450";

I have no idea why this might be useful, but now it’s possible.

See issue 2258 and PR 2259.


Allow setting path to Edge browser binary

Selenide has setting Configuration.browserBinary that allows you set path to browser binary (just in case: in most cases, you don’t need to set it).

Previously, this setting was not supported for Edge browser. Now it’s supported.

Thanks to Vladislav Velichko for PR 2267.


Updated dependencies


News

Statistics

Number of monthly downloads of Selenide exceeded 600 thousands!


Andrei Solntsev

selenide.org

08.05.23