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.
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 и headless firefox).
If you still want to use HtmlUnit or PhantomJS, you just need to add corresponding dependencies to your project.
Before now, method
$.execute accepted only
Command<SelenideElement>, but now it can accept any
.. 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.
- 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: