How do you celebrate Halloween?
We released Selenide 5.5.0 with some backward incompatible changes.
ARE YOU SCARED?
Migrated from JUL to SLF4J
Sometimes Selenide needs to write down some diagnostic logs, like “I found browser binary in foo”, “I failed to save screenshot to bar” etc.
Until now, Selenide did write its logs using Java built-in mechanism
java.util.logging (aka JUL).
It has some known disadvantages, that’s why there is plenty of alternatives in the Java world: Log4J, Slf4j, Logback, JCL.
How it works:
- Slf4J is a “facade”, something like “interface”. Selenide will write logs using it.
- And Log4j, Logback, JCL are implementations of this “interface” (probably there are more of them).
You decide which implementation of Slf4J you want to use. Most probably this decision is already done in your project, because at least WebDriverManager always wrote logs using Slf4J.
To use one of Slf4J implementations, you need to add corresponding dependency to your project:
- slf4j-nop-*.jar (NO! Please DON’T! It just ignores all logs.)
NB! Let me remind: most probably you already have one of these dependencies. So you don’t need to do anything.
If you still don’t have any of these dependencies, you will see such message when running tests (I will not see Selenide logs):
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
If you see it, probably the easiest solution would be to add one line to your build.gradle:
or in pom.xml:
<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.7.28</version> <scope>test</scope> </dependency>
NB! If you failed to setup Slf4j - don’t panic. Selenide logs are not so much important. Test failures will not disappear.
We are only talking about diagnostic INFO and WARNING logs like
INFO Using browser binary: /var/lib/opera.exe.
Thanks to Gleb Schukin for PR 926.
Removed HtmlUnit and PhantomJS dependencies
Don’t be afraid, your tests should still work with HtmlUnit and PhantomJS. Just Selenide will not bring these dependencies transitively (because most of people already migrated to headless chrome and headless firefox).
If you still want to use HtmlUnit or PhantomJS, you just need to add corresponding dependencies to your project.
Thanks to Aliaksandr Rasolka for PR 1003 and PR 998.
Removed built-in support for Safari browser
But don’t worry, you can still use Safari! See the instruction
Before now, method
$.execute accepted only
Command<SelenideElement>, but now it can accept any
See issue 1000 and PR 1001.
.. which we broke in Selenide 5.4.1. Now browser is left opened again, and you can investigate your failed tests.
Take a screenshot in case of
As you know, Selenide has a method for verifying text of modal dialog (
confirm("Are you sure?");
But when this check failed, Selenide forgot to take a screenshot. Now it’s fixed.
See issue 907. Thanks to Nick Holloway for PR 986.
Though it’s just a refactoring, and it will not affect you, I must mention the initiative of SeleniumTestAB who decided to improve Selenide code and sent PR 1004 and PR 1006.
- Presentation about Selenide on EclipseCon 2019: A complete Selenium Techstack
- My presentation for Cyprus Quality Conference Threesome: Selenide for Web, Android and iOS”. So far, only slides.
And the most important!
Selenide got 8 years old!
25.10.2011 a first commit to Selenide was done.
After 8 years, we have:
- 89K downloads from 14K unique IPs (per month)
- 1K stars on github
- 55 contributors
Many thanks to all contributors, users, critics, ideologists and just sympathizers.
This is just the beginning :)
Selenide download statistics for October, 2019: