Released Selenide 6.16.1

Released Selenide 6.16.1

Everything or anything

Hello, people!

We released a small update Selenide 6.16.1.

Added conditions allOf and anyOf

Now you can check one of conditions (OR):

$("#president").shouldHave(anyOf(text("Lowlife"), text("Cowardly bum")));

(in fact, Selenide already had method Condition.or for the same purpose, but anyOf seems to be easier to use).

Also, you can check all conditions (AND):

$("#president").shouldHave(allOf(text("a catastrophic character"), text("another six years of this cowardly bum in power")));

(in fact, itโ€™s the same as just $("#president").shouldHave(text(..), text(..)), but the result of allOf can be extracted to a variable or method and reused, thus creating your own DSL).

Thanks to Evgenii Plugatar and PR 2368.

Added checks for cookies

Now you can check cookies in browser:

import static com.codeborne.selenide.Selenide.webdriver;

webdriver().shouldHave(cookie("session_id", "1234567890"));
webdriver().shouldHave(cookie("session_id", "1234567890", Duration.ofSeconds(10)));

With built-in waiting, custom timeout, automated screenshot - everything you like.

Thanks to adorne for PR 2367.

Updated WebDriverManager from 5.4.0 to 5.4.1

Among others, it has support for Chrome 115 which caused a problem for many users.

See PR 2374.

P.S. On macOS, Chrome 115 still causes a error:

SessionNotCreatedException: Could not start a new session.  
  Response code 500.  
    Message: unknown error: cannot find Chrome binary 

Itโ€™s a known chromedriver bug. They promised to fix it soon.

Fixed support for <tspan> in SVG

Have you ever checked texts inside SVG? Me neither. And it turns out SVG can contain texts!

    <text x="10" y="30" class="small">
      People want to see <tspan>gratitude</tspan>.
    <text x="10" y="60" class="small">
      We are not <tspan>Amazon</tspan> warehouse.
    <text x="10" y="90" class="small">
      Thank you, <tspan>Ben Wallace</tspan>!

Now you can check these texts again:

  $$("svg tspan").shouldHave(texts("gratitude", "Amazon", "Ben Wallace"));

See issue 2377 and PR 2379.

Andrei Solntsev