Released Selenide 5.3.0

Blog

Released Selenide 5.3.0

Execute custom commands

We released Selenide 5.3.0. What’s new?


#968 Execute custom commands

You will like this feature!

I believe your code is fill of custom methods for operating web elements. You use some tricky double click, select some non-standard radio button on ReactJS, pick a date from hipster datepicker and upload a file from hidden input.

Now we added a convenient way to execute such commands in one line. You just need to call method $.execute:

    var turnCalendar = new Command<SelenideElement>() {...};
    var pickDate = new Command<SelenideElement>() {...};

    $("hiddenFileInput").execute(turnCalendar).execute(pickDate("03.09");

Thanks to Aleksandr Rasolka for pull request 968.


#970 Improved error message for shouldHave(attribute("href", ..."))

Folks reported a strange problem: href is the same, but test fails:

Element should have attribute href="/files/hello_world.txt" {by text: Download me}
Element: '<a href="/files/hello_world.txt">Download me</a>'

The problem is with one nuance in Selenium: method WebElement.getAttribute("href") returns absolute URL, even if href contains a relative URL.

Actually we haven’t fixed this nuance, but improved the error message. Now it shows the actual value of the attribute:

Actual value: href="http://my-test-env.com:9999/files/hello_world.txt"


#469 Improved error messages for OR checks

Probably you know that Selenide allows you to check one of multiple conditions (OR operand). It’s useful when you need to check if first OR second condition is matched (or both).

    
    $("input#agree").shouldBe(or("checked", 
      attribute("checked", "true"), 
      attribute("checked", "on")
    ));


The problem was: when such a test failed, it reported an invalid error message. It included only the first condition:


Element should have attribute 'attribute checked' {input#agree}"


We have fixed it. Now it reports all conditions from OR block:


Element should be checked: attribute 'true' or attribute 'on' {input#agree}

See Issue 469 and PR 962.


Upgraded to WebDriverManager:3.6.2

It seems to have mostly fixes for Edge browser. Changelog is here.


Новости

  • Boni García (author of WebDriverManager) created selenium-jupiter - a wrapper for Selenide (+JUnit5 +Docker). Look ma, a wrapper for a wrapper!
  • Comparision of Selenide and FluentLenium: Part 1, Part 2
  • Wow! Sergei Egorov (committer of TestContainers) created a true magic: Jabel. Now you can write code on Java13 and compile it to Java8 byte code.


Conferences

  • September, 20-21 - I will give two talks at QA Fest conference - Kyiv, Ukraine


Andrei Solntsev

selenide.org

blog comments powered by Disqus

The project is maintained by