Released Selenide 6.6.0

Released Selenide 6.6.0

Deshortcutification of $.clear


Good morning, friends!


We released Selenide 6.6.0.

Added new Selenide plugin selenide-clear-with-shortcut

In Selenide 6.5.0, we changed the implementation of $.clear() method from a standard WebDriver to a shortcut (“Select all” -> “Delete”).
Later we realized this shortcut didn’t work stably in all browsers, we had to rework it. It got more stable, but slower. And since it’s not really needed for all, we decided to return the old good WebElement.clear().

And if you need the smart $.clean() method with shortcuts - you can add the brand new Selenide plugin:

  testImplementation('com.codeborne:selenide:6.6.0')
  testImplementation('com.codeborne:selenide-clear-with-shortcut:6.6.0')

Dependency com.codeborne:selenide-clear-with-shortcut will override method $.clear() - and $.setValue() correspondingly.

See issue 1497, PR 1847 and PR 1838.


Fix method $.clear() in Safari

We found that new $.clear() didn’t work in Safari browser (who uses it nowadays?).
I hope we fixed it. :)

See issue 1819 and PR 1820.


New checks for element own text

Added two new checks for element’s own text:

  • $("#child_div1").shouldHave(ownTextCaseSensitive("Son"));
  • $("#child_div1").shouldHave(exactOwnTextCaseSensitive("Son"))

Thanks to Kachurin Alexandr for PR 1811 and PR 1812.


Added method $.click() with timeout

By default, method $.click() has the standard Selenide timeout (which is initially 4 seconds).
Sometimes it’s not enough - for example:

  1. if clicking a link opens a new page which loads longer than 4 seconds.
  2. if the element which we are going to click is not visible yet, and appears after more than 4 seconds.

In this release, we added timeout parameter to method $.click:

  $("#slow-link").click(usingDefaultMethod().timeout(ofSeconds(8)));
  $("#slow-link").click(usingJavaScript().timeout(ofSeconds(8)));

Though, it solves only the first problem. In next release we will also solve the second. :)

See issue 1572 and PR 1845.


These methods existed from the very beginning of Selenide era. They allow working with JavaScript modal dialogs (alert, confirm, prompt). For example:

confirm();
confirm("Are you sure you want to delete all files?");

But they could not have any other timeout except the default one. Now you can pass a timeout parameter:

confirm(withTimeout(ofSeconds(2)));
confirm(withExpectedText("Are you sure?").timeout(ofSeconds(2)));

See issue 1721 and PR 1846.


Fixed method Driver.executeJavaScript()

…to support a wrapped webdriver (i.e. when you have added some listeners to the webdriver).

See PR 1848.


Fixed phrasing of some checks

… to sound correctly in English. Namely:

In a test Was in report Now in report
$.should(appear) “Element should visible” “Element should be visible”
$.should(disappear) “Element should hidden” “Element should be hidden”

See PR 1840.


Restored Safari options

We realized that after upgrading to Selenium 4, we lost most of Safari options.
It was easy to fix, yet… why nobody did complain on it?

Looks like nobody is using Safari… :)

See issue 1836 and PR 1841.


Fixed soft asserts in TestNG

After upgrading to TestNG 7.5, Selenide soft asserts didn’t work anymore. If some check failed, your tests still remained green.

We had to downgrade to TestNG 7.4.0 and hope for the fix on the dark side. :)

See issue 1834 and PR 1843.


Upgraded dependencies


Statistics

We haven’t published Selenide download statistics for a long time:

We’re almost back to our all-time high of 324k downloads in May.


Stay tuned!


Andrei Solntsev

selenide.org