Released Selenide 7.11.1

Released Selenide 7.11.1

Paper release
04.10.25

Good morning!

Great news: we released Selenide 7.11.1.

You’re five weeks working on a release that should have taken a week, Are you a paper tiger?

Yes, the changes are more internal to technical. But they still can break something in your tests. ;)


Disable smooth scrolling

Sometimes tests may flake when they try to click a web element which is moving exactly at this moment. Sometimes it’s moving because of “smooth scrolling” used in web design.

Now Selenide adds a special option:

  • for Chrome - --disable-smooth-scrolling,
  • for Firefox - general.smoothScroll=false.

This option disables smooth scrolling, even if it’s enabled in CSS. Now the click should work stably.

For other browsers, we couldn’t find the needed option. But you can always explicitly call Selenide’s method for scrolling:

$.scrollIntoView(instant());

See issue 2850 and PR 3119.


Fixed usage of Augmenter

Sometimes Selenide could throw such an error:

ConnectionFailedException: JdkWebSocket initial request execution error

It was flying from method WebdriverUnwrapper.unwrap which in turn called Selenium’s class Augmenter. It happens when you run the browser Grid or another cloud, and CDP port is not available from the test machine.

The real fix should be in Selenium when it gets finally merged. But meanwhile, we fixed all usages of Augmenter Selenide, so that it’s now called in the right moment.

NB! If you create new RemoteWebDriver somewhere in your tests, it’s better to immediately wrap it to Augmenter.augment:

RemoteWebDriver webDriver = new RemoteWebDriver(gridUrl, options);
webDriver.setFileDetector(new LocalFileDetector());
return new Augmenter().augment(webDriver); // Add this line if you don't have it yet

Without it, your RemoteWebDriver will not implement interfaces HasBiDi, HasDevTools, HasLogEvents etc. - and the corresponding methods will not work for you.

See issue 3107 and PR 3114.

UPD Next day, we released a fix 7.11.1, which includes the abovementioned fix for Selenium.


RefactoredScreenShotLaboratory

We slightly refactored class ScreenShotLaboratory - now it’s easy to override it, and pass your instance to SelenideDriver.

Thanks to Matthias Kurz for PR 3128, PR 3130, PR 3131, PR 3134 and PR 3135.


Removed hack for HostIdentifier

Back in 2021, I added a hack to Selenide to overcome a problem with HostIdentifier (see issue 9784).

But this hack had side effects. Sometimes you might see in logs some garbage like this:

WARNING: Failed to resolve host address
java.net.UnknownHostException: gitrun1: gitrun1: Name or service not known
 at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1936)
 at org.openqa.selenium.net.HostIdentifier.resolveHostAddress(HostIdentifier.java:107)
 at org.openqa.selenium.net.HostIdentifier.getHostAddress(HostIdentifier.java:126)
 at com.codeborne.selenide.drivercommands.CreateDriverCommand.lambda$createDriver$0(CreateDriverCommand.java:46)
 ...
 at com.codeborne.selenide.Selenide.open(Selenide.java:50)

Later the problem with HostIdentifier was fixed in Selenium, so the hack was not needed anymore. So we finally have removed it from Selenide.

See PR 3113.


Publish jars without signing

If you want to change Selenide code and build locally, you can run this short command:

  ./gradlew
  
  # or without tests for speed:
  ./gradlew publishToMavenLocal -x test

This command builds Selenide binaries and publishes to local maven repository.

We realized that this command didn’t work if you haven’t configured signing keys. These keys are not needed for most people (unless you are going to publish binaries to Central maven repository).

Now this command works without any keys. Enough for building locally. But don’t forget to submit a pull request - maybe your change would be useful for others too?

See issue 3127 and PR 3132.


Updated Selenium from 4.35.0 to 4.36.0

And bumped CDP from v139 to v140.

See PR 3133


Updated JUnit from 5.x to 6.0.0

It should be a good release. It requires Java 17 and supports JSpecify annotations.

Yes, the JUnit5 library will now be in its sixth version. :)

See PR 3125


In the end, the release doesn’t bring any major new features, but there’s power under the hood! Important technical changes that are essential. Maybe still a real bear, at least here? :)


Andrei Solntsev

selenide.org

04.10.25