Released Selenide 4.6


Released Selenide 4.6

Minor improvements

Good night!

We released Selenide 4.6

Method $.shouldHave(exactValue(" foo ")) does not trim leading/trailing spaces anymore

As you probably know, method $.shouldHave(value(" foo ")) (which we all typically use) trims leading/trailing spaces in the given string. It’s convenient because web browsers also do so. But we recently found that method exactValue() also do it, and that’s not right.

Assuming that you have <textarea value="Regression test description "></textarea> on a page, the check $("textarea").shouldHave(exactValue("Regression test description ")); failed before this release. Not it will not.

See. issue 573

Thanks to @mseele for the pull request!

We added method $.getSearchCriteria()

Selenide always had a convenient method $.toString() - it prints actual description of a web element: tag, text, attributes. It’s very useful for logging and debugging. Bit it has one drawback: it calls webdriver methods to get those data, which can be slow sometimes.

So we added method $.getSearchCriteria() that doesn’t call any webdriver methods, but just returns a locator.

Simply said,

  assertThat($("h2").toString(), equalTo("<h2>Dropdown list</h2>"));
  assertThat($("h2").getSearchCriteria(), equalTo("h2"));

Fixed issue 528

Thanks to @BorisOsipov for the pull request!

Fixed issue 484

Sometimes Selenide could throw such an error without screenshot:

Element not found {#valid-id.findBy(text 'INVALID-TEXT')}
Expected: text '9802222-99LX'

Screenshot: null
Timeout: 0 ms.

We fixed it.

Fixed running IE on selenium grid

(OMG, does somebody still use IE and Grid in 21st century?)

See. issue 529

Thanks to @BorisOsipov for the pull request!



Andrei Solntsev

blog comments powered by Disqus

The project is maintained by