Happy Birthday, Selenide!
Wow! It’s hard to believe, but today Selenide got … 10 years old!
This day 10 years ago was created the first commit to Selenide github repository.
Many thanks to everyone who participated in the project, committed, reported bugs, suggested ideas, answered questions in the forums, criticized and talked about selenide at conferences and meetups. And who just decided to use Selenide in their projects. You are all part of this movement.
In honor of the anniversary, we released major version Selenide 6.0.1.
Upgraded to Selenium Webdriver 4.0.0
Nothing really should change for you until you are using Selenium Grid. Everything more or less works as before. Well, some classes were renamed or deprecated - it seems not scary.
Selenium 4 also brings new features (like CDP and Relative locators), but haven’t introduced any special support for them yet. Can work on it in next versions if needed.
Splitted Selenide to several artifacts
Before now, the whole Selenide code was published as a single artifact:
And you had to add other dependencies like JUnit or TestNG, and probably BrowserMobProxy.
Now we made it easier for you (especially with proxy).
- For JUnit5 users the dependency will not change:
- JUnit4 users should use
- TestNG users should use
- If you want to use proxy, it’s enough to add dependency
testImplementation("com.codeborne:selenide-proxy:6.0.1)- and forget about all these BrowserUpProxy, Netty etc.
- And if you happen to be a radical hater of static methods, now you can also be happy by declaring
testImplementation("com.codeborne:selenide-core:6.0.1)- and then you will only have
See PR 1612.
Removed lots of deprecated code
Here you can find what exactly was removed and how can you replaced it.
Remove support for browser “legacy_firefox”
It was an old webdriver that worked with Firefox 52 and earlier. I guess it’s not used anymore.
See PR 1610.
Removed some old settings
We think this is bad practice, because the size of the browser window depends on the current environment, which can lead to flaky tests.
We recommend to use
Configuration.browserSize instead (default value is
Most probably you didn’t use it because it was
false by default.
Now for selecting a value from
<input type=radio> you can use plain old methods
It turns out that the standard Java method
Thread.sleep (N) does not necessarily sleep exactly N ms, it can wake up earlier.
And this can cause flaky tests if your expected a certain pause.
Selenide.sleep(N) is guaranteed to wait at least given number of milliseconds.
Added methods for adding/removing
Selenide has method for adding
WebDriverEventListener, but this class was replaced by
WebDriverListener in Selenium 4.
So we have to support both.
Changed signature of method
It doesn’t concern you until you created your custom Conditions.
Before now, class
Condition had method
apply which returned
public boolean apply(Driver driver, WebElement element)
Now you need to rename it to
check and return
CheckResult instead of
public CheckResult check(Driver driver, WebElement element)
CheckResult contains not only flag “condition met / not met”, but also a actual value at that moment.
It allows Selenide to generate a better error message in case of test failure.
P.S. Though, old method
apply is not removed, but just marked as deprecated. So you can postpone this refactoring for some time.
selenide-selenoid:2.0.1 with upgrade to Selenide 6.0.1
It seems that Appium doesn’t support Selenium 4 yet, so we cannot upgrade
selenide-appium yet. Stay tuned.
UPD Selenide 6.0.2
We found a problem with projects using TestNG, released a hotfix 6.0.2.
See issue 1623
UPD Selenide 6.0.3
It appears that Maven can fetch an older version of
selenium-api-3*.jar if it’s found in a dependency tree (usually in BrowserUpProxy or Allure transitive dependencies).
I personally find this Maven behaviour misleading and just wrong. Maven could pick up a newer version.
But since people often experience this problem, we decided to add a workaround on Selenide side.
See workaround 1625
What to read about Selenium 4
- What’s New In Selenium 4? by Applitools
- Selenium 4: Understanding Key Features by BrowserStack
- A comprehensive guide to Selenium 4 by SauceLabs
- What Is New In Selenium 4 And What Is Deprecated In It? by LambdaTest
- Updated Selenium website
- Aerokube released alternative WebDriver client. In theory, Selenide could now use it under the hood instead of Selenium Webdriver. Sounds tempting?
- I haven’t figured it out yet, but people seem to be praising it: some Docker images for Selenium
Selenide download statistics
We crossed 255K downloads per months!
What is waiting us in next 10 years?