Released Selenide 5.14.0

Blog

Released Selenide 5.14.0

Stabilized FOLDER

Good night!

We have released Selenide 5.14.0.

Stabilized new file downloading mode FOLDER

… which was introduced in Selenide 5.13.0.

What has been changed in 5.14.0:

  1. Every time when Selenide opens a browser it creates a unique downloads folder for it.
    It helps to avoid situation when parallel tests are downloading multiple files to the same folder at the same time. And it’s impossible to understand what file is downloaded by which test.

    See issue 1220 and PR 1221.

    • Unfortunately, it doesn’t work in IE and Safari (which don’t allow to customize downloads folder).
    • It works only for browsers opened by Selenide itself.
    • If you create browser by yourself, you will need to create the downloads folder and pass it to Selenide:
      • either using new method setWebDriver(driver, proxy, downloadsFolder).
      • or constructor SelenideDriver(..., downloadsFolder).
  2. Before downloading next file, Selenide clears the downloads folder – see PR 1252
  3. In the end of tests run, Selenide deletes all empty downloads folders – see PR 1247

Added check $$.shouldHave(itemWithText("any text"))

Unlike the classic check $$.shouldHave(texts("text1", "text2")), it verifies that collection contains at least one element with given text.

Thanks to Luis Serna for PR 1194.

By the way, it’s the first commit to Selenide from Bolivia! :)

Added support for Safari browser

Few years ago Selenide already had Safari support, but it seemed to work badly at that time.
At some moment, we removed the Safari support.
Now it’s the next try. This time Safari tests seem to work more or less.

As usually, you need to add just one line to run tests in Safari:

  1. Configuration.browser = "safari"; or
  2. -Dselenide.browser=safari

Please share your feedback.

See issue 1236 and PR 1237.

Added method SelenideDriver.screenshot(fileName)

It may be useful when you create “non-static” variant of driver (new SelenideDriver()) and want to take screenshots.
Now you can do it.

See issue 1166 and PR 1227.

Added method SelenideDriver.screenshot(OutputType)

Sometimes you need to get screenshot in Base64 format. For example, some visual comparison tools want it.

Now you can get screenshot as Base64 (or File or bytes) with new method screenshot(OutputType):

String screenshot = Selenide.screenshot(OutputType.BASE64);
byte[] decoded = Base64.getDecoder().decode(screenshot);
BufferedImage img = ImageIO.read(new ByteArrayInputStream(decoded));

See issue 1224 and PR 1231.

Now Selenide takes a screenshot when method switchTo() fails

As you know, Selenide automatically takes a screenshot in case of test failure.
But we found that Selenide didn’t take a screenshot if one of these methods failed:

  • switchTo(frame)
  • switchTo(window)
  • switchTo(alert)

Now we fixed it.

See issue 1190 and PR 1240.

Added chrome option --disable-dev-shm-usage

We found that without this option, Chrome might sometimes crash (because of out of memory error).

  1. Why nobody complained about this?
  2. Are thing better now after adding this option? Please share your feedback.

Fixed Sizzle selectors on web pages containing Dojo.js, troop.js etc.

See issue 434 and PR 1242.

Made method $.toString() safer

See issue 1241 and PR 1245.

Improved error message when web element has disappeared

See issue 1013 and PR 1239.

Upgraded to WebDriverManager 4.1.0

See WDM Changelog.


News

And a bunch of posts by Alexander Pushkarev:


Andrei Solntsev

selenide.org

blog comments powered by Disqus

The project is maintained by