Good night!
We released Selenide 3.8! It fixes some small issues and introduces small but useful features.
Fixed file uploading on remote browsers in Grid
Thanks to Alexei Vinogradov for fixing remote upload!
Now you can disable automatic creating of *.html files
When your test fails, Selenide automatically saves 2 files:
- Screenshot - *.png file
- Page source code - *.html file
But sometimes people don’t want to save *.html files. For example, in case of single page application the page source contains html code of all application pages. Thus it’s too big and useless.
Now you can disable saving html files. As usually, via system property:
mvn test -Dselenide.savePageSource=false
or directly in your code:
Configuration.savePageSource = false;
Thanks to Boris Osipov for this pull request!
Added method $.dragAndDropTo(WebElement)
Until now, Selenide had only method $.dragAndDropTo(String)
,
where string parameter is CSS selector of target element.
But sometimes you want to define target element in another way.
Now you can use the new method $.dragAndDropTo(WebElement)
. For example:
SelenideElement target = $(byText("Drop here"));
$("#from").dragAndDropTo(target);
See issue #355
Now TestNG annotations SimpleReport
and SoftAsserts
are thread-safe
If you use annotations SimpleReport
or SoftAsserts
and TestNG framework,
and run tests in parallel, you could see an empty report sometimes.
Or you could get ConcurrentModificationException
time-to-time.
It appeared that TestNG is bad boy. Just bad.
If you declare @Listener(SoftAsserts)
for one test class, TestNG
creates a single instance of SoftAsserts
and uses for ALL tests (even parallel).
As opposite, JUnit is cool guy. It creates a new instance of every test class and every Rule before running every next test method. Thus it avoids dependencies between tests and random failures because of previous tests.
We have fixed this problem. Now SoftAsserts
listener can work in several parallel threads.
Even in TestNG.
Added new methods to class Selectors
: byCssSelector()
and byClassName()
I am still not sure that it’s really needed, but people asked for it many times.
No Selectors
has by*
analogues for all selenium By.*
methods.
See issue #360.
Fixed JavaScript error when running Edge browser
Now you can run your Selenide tests with the new Microsoft browser Edge. People say it should be quite fast.
See issue #339.
Now method $.screenshot()
saves screenshots in a right place
Selenide has method for saving screenshot of a single element (not a whole page):
String screenshotFile = $("#footer").screenshot();
The problem is that this method saved screenshot to the project root.
Now it’s fixed, and saves screenshot to the right place - build/reports
by default.
See issue #290.
Added protection against invalid soft asserts usages
Now Selenide will throw an exception if you enable “Soft asserts” mode,
but forget to add SoftAssert
annotation to your test classes.
See issue #302.
We added link to implementation to all SelenideElement
methods’ javadoc
For example, method $(“input”).setValue(“hello”)
is actually implemented in class SetValue
See issue #367.
Upgraded to htmlunit 2.23
See htmlunit release notes
News
- Article about Selenide in Spanish by Dario Lamy
- Why developers must be good testers
- New cool conference in Saint-Petersburg: Heisenbug - looks promising, I am going to speak there
- New cool article from Uncle Bob: The Churn
- What is a true hardcode
- True page objects
For dessert
And for dessert - a fresh joke about Chuck Norris:
Chuck Norris does not use Selenide.
Chuck Norris writes tests in pure Selenium webdriver.
Chuck Norris is immortal - he has enough time for this.
Let’s upgrade!
selenide.org
06.08.16