Released Selenide 6.3.0

Released Selenide 6.3.0

The beginning of a beautiful friendship

Hello, people!

We released Selenide 6.3.0.

Let’s review what’s changed?

Added methods switchTo().frame(timeout) with custom timeout

Selenide has methods switchTo().frame(name) for switching between frames. As usually, with built-in waiting and other bonuses.
But what if the frame is being loaded longer than the default timeout (4 seconds)?

Now you can pass an additional parameter Duration - the timeout for switching into the frame:

  switchTo().frame("ifrm");                          // waits up to default timeout (4 seconds)
  switchTo().frame("ifrm", Duration.ofSeconds(6));   // waits up to 6 seconds

Thanks to @donesvad for PR 1722.

Added selectors byTagAndText and withTagAndText

Selenide has method for finding elements by text:

  import static com.codeborne.selenide.Selectors.*;

  $(byText("Hello world")).shouldHave(text("Hello World"));
  $(withText("Hello")).shouldHave(text("Hello World"));

But sometimes it’s not enough: if there are multiple elements with given text, and you need to pick one of them by tag.

Now Selenide has methods for find by tag and text:

  import static com.codeborne.selenide.Selectors.*;

  $(byTagAndText("h1", "Hello world")).shouldHave(text("Hello World"));
  $(withTagAndText("h1", "Hello")).shouldHave(text("Hello World"));

Thanks to Maurizio Lattuada for issue 1650 and PR 1651.

Fixed bug in byTextCaseInsensitive

Now this selector ignores leading/trailing spaces and newlines in the text (like the canonical byText).

See issue 1723 and PR 1724.

Added records “webdriver create” and “webdriver close” to report

If you use Selenide’s TextReport or plugin AllureSelenide, you are used to see the report in the end of every test.
The report shows all the performed steps: open a page - find an element - click etc.

Now the report also shows moments when the webdriver was created or closed. This information may be useful when debugging some problems with tests.

Thanks to Petro Ovcharenko for PR 1715.

Fixed overriding of Selenium timeout

In Selenide 5.22.0 we introduced a hack for overriding Selenium webdriver timeout from (unreasonably long) 3 hours to 2 minutes.

But this hack was broken after upgrade to Selenium 4 (as it always happens to all hacks). Now we reanimated it.

Let me remind that Selenide now has the following timeouts in communication between tests and webdriver:

  • connect timeout - 10 seconds
  • read timeout - 1.5 minutes

See commit cf02da5.

Removed duplicate wrapping of “Element not found”

See issue 1705 and PR 1706.

Added support for authentication type BEARER

Selenide has several types of authentication:

open("/basic-auth/hello", BASIC, "scott", "tiger");

but only BASIC did really work. Nobody ever tested the other types. :)

And we found that BEARER type didn’t work. Now we fixed it.

This is how you can use it:

    open("/bearer-token-auth/hello", BEARER, new BearerTokenCredentials("token-123"));

See PR 1714.

Now Selenide treats empty settings like selenide.remote as undefined

This change should make devops’ life easier. When configuring CI pipelines and jobs, you often use variables to set Selenide settings:


If GRID_URL variable is not set in some environment, Selenide failed because it tried to parse empty url to set selenide.remote.

Now Selenide will treat empty setting like selenide.remote just undefined and continue work as usually (like selenide.remote was never set).

See Alexei Vinogradov for issue 1656 and Boris Osipov for PR 1663.

Upgraded to Selenium 4.1.2

A heard some users experienced problems with Guava version after upgrading to Selenium 4.1.2. Selenide defined Guava version explicitly, so generally you should not experience such a problem. If you still get something like NoSuchMethodError, please verify the guava version: pribably it’s overridden by some Gradle or Maven plugin. Please refer the old good post about resolving dependencies if needed.

See Selenium changelog and PR 1719.

UPD Selenide 6.3.1

Minor update Selenide 6.3.1:

  • #1731 we restored possibility to use soft asserts in TestNG in methods @Before* and @After* (we occasionally forbidden them it Selenide 6.2.0) - see PR #1732
  • #1729 Upgraded from Netty 4.1.73.Final to 4.1.74.Final

UPD Selenide 6.3.2

Another update Selenide 6.3.2:

  • #1733 Added a workaround for Selenium bug 10345, which caused failure of method FirefoxDriver.close() after upgrading to Firefox 97.
  • #1736 Upgraded from BrowserUpProxy 2.1.3 to 2.1.4
  • #1611 Upgraded Java version from 8 to 17.

Let me explain the Java update. Now Selenide project is built with Java 17, but the generated binaries selenide-*.jar are targeted to Java 8. This allows

  • Selenide developers use all the latest Java features, and
  • Selenide users still run their tests on Java 8 (though we recommend upgrading Java, of course).

It became possible thanks to the tool Jabel and personally Sergei Egorov who came up with this elegant hack (and also involved in TestContainers and AtomicJar).

UPD Selenide 6.3.3

One more minor update Selenide 6.3.3:

  • #1737 allow overriding Firefox preferences for downloading files
  • #1740 upgraded to WebDriverManager 5.1.0

UPD Selenide 6.3.4

Another update Selenide 6.3.4:

  • #1746 show the expected attribute when $.shouldHave(attribute(...)) fails.
  • #1748 fixed module name in generated Selenide binaries

UPD Selenide 6.3.5

Another update Selenide 6.3.5:

  • #1755 fix file download via proxy in case of encoded response - see PR #1756


I think this is the beginning of a beautiful friendship!

Andrei Solntsev