Released Selenide 4.10

Released Selenide 4.10

Fast $$ and headless on the grid

Good night, Seleniders!

We recently got a chance to merge a lot of pull requests and released Selenide 4.10

So, what’s new there?

What you get when update to Selenide 4.10?

We added method $.scrollIntoView()

You can use it to scroll browser to the right place. For example, it can be useful to overcome issues of some browser which cannot click an element that is outside of visible window area.

So, method $.scrollIntoView() says browser to scroll the page so that the element was in a visible area.

Method can have either boolean parameter:

$("#my-button").scrollIntoView(true);  // the top of the element will be aligned to the top
$("#my-button").scrollIntoView(false); // the bottom of the element will be aligned to the bottom

or more advanced String parameter:

$("#my-button").scrollIntoView("{block: \"end\"}");
$("#my-button").scrollIntoView("{behavior: \"instant\", block: \"end\", inline: \"nearest\"}");

Read javadoc for the details.

See issue 649

Thanks to Aleksandr Rasolka for pull request 656.

Now tou can run headless browsers on Selenium Grid

If you run tests on Selenium Grid, you can now open browsers in headless mode. You need only couple of lines to achieve that:

Configuration.remote = "http://selenium-grid-host:port/wd/hub";
Configuration.headless = true;

See issue 660

Thanks to Boris Osipov for pull request 661.

Now you can set custom capabilities for Chrome and Firefox

You can set custom capabilities in Configuration, and Selenide will use them when opening a browser:

Configuration.browserCapabilities = new DesiredCapabilities();
Configuration.browserCapabilities.setCapability(SOME_CAP, "SOME_VALUE_FROM_CONFIGURATION");

See issue 556

Thanks to Sergey Pirogov for pull request 556 and Boris Osipov for pull request 664.

We optimized performance of $$ iteration

Some of Seleniders found that such collection iteration can be slow:

$$("span").forEach(item ->;

Because Selenide reloads all collection elements on every step. See issue 641

We fixed that. Now the loop should be much faster. Thanks to Artem Savosik for pull request 653.

We added “User-Agent” header when downloading a file

As you probably know, Selenide downloads files by issuing a separate http request, copying all cookies from browser to it. Sometimes it’s not enough, because application also checks User-Agent in addition to session cookie. And method $().download() didn’t work in this case.

See issue 639

Now Selenide also copies User-Agent header from browser to http request for downloading file. Method $().download() should work.

Thanks to Aleksandr Rasolka for pull request 657.

Now methods byText and withText understand unbreakable spaces

Imagine that you have such an element on a page:


By now, command $(byText("Hello world")) or $(withText("Hello world")) could not find it. Now it can.

We improved methods byText and withText to understand non-breakable spaces, or characters &nbsp or \u00A0. Now these characters are treated as usual spaces.

See issue 597

Upgraded to phantomjsdriver 1.4.4

Which in turn was upgraded to selenium-java 3.8.1 (and doesn’t have any other changes).

Upgraded to htmlunit 2.29 and guava:23.6-jre

… just in case


I warmly welcome you to the great SeleniumCamp conference!

2 days, 3 tracks, 500+ attendees. And Kiev is a beautiful city.

See you on SeleniumCamp 2-3 2-3.03.2018

Happy New @Deprecated Year!

Andrei Solntsev