Released Selenide 4.11.0

Released Selenide 4.11.0

God mode in Selenide
02.04.18

Good morning, my friends!

We released Selenide 4.11.0. What’s new there?


Upgraded to selenium 3.11.0

The main changes in selenium 3.11.0 are about Internet Explorer and Windows platform.

And also:

  • removed methods startClient and stopClient in class RemoteWebDriver
  • remove properties SafariOptions.cleanSession and SafariOptions.port


Added collection condition textsInAnyOrder

Now you can write more advanced check for collections:

$$.shouldHave(textsInAnyOrder("Push", "Image", "Email"))

See issue 478 – thanks to hyunil-shin for PR 589


Now you can set browser position

As usually, either via system property:

-Dselenide.browserPosition=300x200

or in code:

Configuration.browserPosition = "400x300";

See issue 687 – thanks to Aliaksandr Rasolka for PR 687


Now Selenide can download files with non-ascii characters in name

Now this code will work correctly:

  File file = $("a").download();
  assertThat(file.getName()).isEqualTo("файл-с-русским-названием.txt");

Before this release, Selenide created a file with name -------.txt

See issue 688 and PR 689


Now you can pass chromeoptions.prefs to webdriver

Similar to chromeoptions.args, now you can pass parameter chromeoptions.prefs to your tests:

-Dchromeoptions.prefs=profile.block_third_party_cookies=false,profile.avatar_index=26

See PR 692 - thanks to Tymur Kubai


Now you can add your own interceptor to Selenide built-in proxy server

People asked for this feature for a long time. And we finally did it!

getSelenideProxy().addRequestFilter("proxy-usages.request", new RequestFilter() {...});
getSelenideProxy().addResponseFilter("proxy-usages.response", new ResponseFilter() {...});

In RequestFilter and ResponseFilter subclasses you can do pretty anything that is not possible in pure Selenium: log requests/responses between browser and server, measure times, get http status, modify request or response body, inject custom JavaScript to html etc. This is the god mode in Selenide!

I hope you are going to use the god mode to make your tests more fast and stable.

As usually, you can find sample usages in Selenide own tests.

NB! Now Selenide starts its built-in proxy server only if Configuration.fileDownload=PROXY.

Probably we should break this dependency. Feel free to send your feedback.


Method $.followLink() was marked as deprecated

Nobody remembers why it was created 7 years ago. But now you can just use $.click() instead.


Fixed a occasional NullPointerException in SelenideReport

Nobody knows how to reproduce it, but we had to fix it.

Thanks to dkorobtsov for PR 686


We fixed a problem when Selenide didn’t take screenshot in soft asserts

See issue 655 - thanks to Boris Osipov for PR 659


News

Resources


And a whole bunch of materials about in Japanese:


See you soon!

Andrei Solntsev

selenide.org

02.04.18