Changes in Selenide 2.15

✓ Selenium 3.0.0 ✓ Java 8


Changes in Selenide 2.15

Sizzle selectors, multifile upload, BrowserMob proxy, zoom, Selenium 2.44.0

Good evening!

Good news: we have released Selenide 2.15. This time we have a lot of new features.

Sizzle selectors (CSS3)

Now you can use CSS3 selectors in Selenide for searching web elements!

For example:

$(":contains('Tere Martin!')").shouldBe(visible);

To enable Sizzle selectors, add this line to your tests:

Configuration.selectorMode = Sizzle;

Feel free to share your experience with us. Did it work for you?

Multifile upload

Now functions $.uploadFile() and $.uploadFileFromClasspath() can accept multiple arguments. This means that you can upload multiple files with Selenide!

Standard Selenium webdriver doesn’t provide such function, so we had to make it with a help of black magic. Please share your experience, if it worked for you.

Support for BrowserMob proxy

We added convenient way for Selenide to add Proxy server to webdriver. First of all, it was needed for BrowserMob proxy - a popular tool among testers. It allows to intercept http requests between web application and browser, thus making possible many things that are now allowed with pure Selenium webdriver:

  • file download from server,
  • authorization on site,
  • asserting HTTP statuses,
  • and so on

Thanks to Vladimir Denisov for this pull request!

Here is an example of using BrowserMob Proxy with Selenide

ProxyServer proxyServer = new ProxyServer(findFreePort());


List<HarEntry> harEntries = proxyServer.getHar().getLog().getEntries();

You can zoom page now!

You can find sample usage in tests:

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

zoom(2.0); // Enlarge page zoom twice
zoom(0.5); // Zoom out twice

It can be useful for testing responsive design.

Support for JSON and iCal

You can now open non-html pages with Selenide.

It can be useful for testing json, iCal etc. resources. Sometimes it’s useful to check them inside UI tests.

assertThat(source(), containsString("DTSTART:20140409T090000"));

Support for tabs and windows/tabs

Now Selenide allows switching between tabs/windows/frames not only by title, but also by index (0, 1, 2, …).

Examples of switching between frames:

assertTrue(source().contains("Hello, WinRar!"));

$("h1").shouldHave(text("Page with dynamic select"));

Examples of switching between tabs:

$("h1").shouldHave(text("Page with JQuery"));

$("h1").shouldHave(text("File uploads"));

$("h1").shouldHave(text("Page with alerts"));


Support for Allure Framework

We have added function to get screenshot as a file:

import static com.codeborne.selenide.Screenshots.getScreenShotAsFile;

File screenshot = getScreenShotAsFile();

It can be used for integration with Allure Framework.

Thanks to Vladimir Denisov for this pull request!

Upgraded to Selenium 2.44.0.

  • Note that it brings upgrade of Google Guava to version 18.0.
  • Unfortunately, PhantomJS 1.2 does not work with Selenium webdriver 2.44.0 :( We have already committed Pull Request в ghostdriver for ghostdriver. Now waiting until it gets released.

And what’s up with you?

blog comments powered by Disqus

The project is maintained by