Hello!
We released Selenide 3.0. Finally!
NB! Selenide 3.0 is a major upgrade, meaning that something can become broken.
Don’t be afraid: if you used only public API and didn’t used @Deprecated methods, then nothing changes for you. But if you did, read carefully.
Historical notes
The first version Selenide 1.0 was created in year 2011. We silently tested and tuned it for more than a year.
In March 2013 we went to SeleniumCamp conference in Kiev and released Selenide 2.0 there.
In 2.0 we cleaned up all the legacy and left only the new API.
Then was the first “public” version of Selenide 2.0 born.
At that moment, SelenideElement
has only a dozen of methods and was called ShouldableWebElement
. :)
Since that we released 25 versions Selenide, it got a lot of new functions, and its own legacy @Deprecated methods. We needed changes.
That’s why we finally released Selenide 3.0
New functions in Selenide 3.0
There is only one new function - method Selenide.updateHash()
. It’s useful for testing rich ajax applications that
react to “#” changes in URL. Method updateHash()
changes “#bla-bla” part of current URL without reloading the page.
Look here for usage example.
Thanks to @fabienbancharel for pull request #254
Upgraded dependencies
- upgraded to Sizzle 2.2.1
- upgraded to Guava 19.0
- upgraded to TestNG 6.9.10
It only affects you if you use some of these libraries.
Big refactoring
- We refactored class
AbstractSelenideElement
. Now, instead of one huge class, we have a lot of small classes (in packagecom.codeborne.com.commands
). Everyone of them has its own responsibility. - You can easily override any of
SelenideElement
methods. - You can even add your own methods to standard Selenide and Selenium methods.
We will describe these great options in details in a separate post, but you can look to examples in Selenide tests.
Thanks to Iakiv Kramarenko for his ideas and night discussions.
Big cleanup
Like we announce earlier, we cleaned up all the old stuff.
- Remove deprecated conditions:
notPresent
-> Use method$.shouldNot(exist)
or$.shouldNotBe(present)
.hasOptions
-> Not needed anymore. Use methods$.selectOption()
or$.selectOptionByValue()
.options
-> Not needed anymore. Use methods$.selectOption()
or$.selectOptionByValue()
.hasNotClass
-> Use method$.shouldNotHave(cssClass("abc"))
- Remove deprecated class JQuery
- Remove deprecated class PrettyReportCreator (use class
TextReport
for JUnit or TestNG) - Remove deprecated methods
Selenide.switchToWindow(title)
-> use methodswitchTo().window(title)
Selenide.switchToWindow(index)
-> use methodswitchTo().window(index)
- Remove deprecated methods
WebDriverRunner.ie()
-> use methodWebDriverRunner.isIE()
WebDriverRunner.htmlUnit()
-> use methodWebDriverRunner.isHtmlUnit()
WebDriverRunner.phantomjs()
-> use methodWebDriverRunner.isPhantomjs()
WebDriverRunner.takeScreenShot()
-> use methodScreenshots.takeScreenShot()
- Remove deprecated methods
$.should*(String message, Condition condition)
-> use method$.should*(condition.because(message))
- Remove class com.codeborne.selenide.impl.Quotes because it was migrated to Selenium Webdriver (org.openqa.selenium.support.ui.Quotes)
Feel free to give feedback if you get something broken.
News
- Selenide got to Best tools and sites for Java in 2015
- Article about Selenide in Java Advent Calendar 2015 Effective UI tests with Selenide
- Article about Selenide in Japan Selenide Java Library:簡単なことは簡単に,Web UI テスト自動化の敷居を下げ,生産性をあげる魔法の Wrapper
Happy new year!
I wish you fast and effective tests.
Andrei Solntsev
selenide.org
30.11.15