Dear friends, we released Selenide 4.11.2. Below you can find the notable changes of this release.
Now you can make screenshots inside iframe
You can find examples in ScreenshotInIframeTest:
SelenideElement iframe = $("#iframe_page");
SelenideElement element = $("#small_div");
File file = Screenshots.takeScreenShot(iframe, element);
Thanks to Andrejs Kalnačs for PR 705
We added method atBottom()
Now you can check if a page is scrolled to the bottom:
assertFalse(atBottom());
executeJavaScript("return window.scrollTo(0, document.body.scrollHeight);");
assertTrue(atBottom());
You can find examples in PageAtBottomTest
We added setting setValueChangeEvent
As you probably know, methods $.append()
and $.setValue()
trigger few events after setting a value to the input field, including the change
event.
We recently realized that it’s wrong, because the change
even should be triggered by browser.
It also caused problems in some cases - for example, when this change
event caused focus moving to the next element in
DOM which was actually outside of viewport.
Don’t panic, Selenide behaviour hasn’t changed by default. Default value is setValueChangeEvent=true
.
If you agree with our reasoning, disable triggering change
event via system property:
-Dselenide.setValueChangeEvent=false
or right in code:
Configuration.setValueChangeEvent = false;
If you disagree, feel free to share your thoughts. Let’s discuss it!
Thanks to MikeShysh for PR 718
We upgraded dependencies
- htmlunit:2.30
- webdrivermanager:2.2.1
If you use a custom SLF4J
implementation, you may get some spam in logs like this:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/arasolka/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-slf4j-impl/2.11.0/9ba207b78e470fe7765ebee14f1f0336c9cbcc18/log4j-slf4j-impl-2.11.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/arasolka/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
To remove this spam, ignore the transitive dependency of webdrivermanager
:
configurations.all {
exclude group: "ch.qos.logback", module: "logback-classic"
}
We will fix it in next Selenide version.
Statistics
We haven’t posted Selenide download statistics for a long time. And it is growing! A year ago there were 8000, now 18000 downloads in a month.
Life is going on!
selenide.org
25.04.18