
An alpha version of Selenium is released as 4.0.0-alpha-1. Though release is not announced officially by Selenium guys yet (April 28, 2019) . You can check their official website www.seleniumhq.org/download and observe that they have not updated anything about Selenium 4 Alpha release.
But Selenium 4 alpha is available to download at MVN Repository and also zip file can be downloaded from here.
New Features
I am going to list out some new features of Selenium 4 for Java binding here:-
- Now you can launch a new tab and window and by default switch to it. “newWindow” method from “WebDriver” interface creates a new browser window and switches the focus for future commands of this driver to the new window.
- You can capture (Screenshot) a particular web element directly instead of capturing whole screen. Earlier it was possible by cropping it using dimensions.
- Selects class overrides equals() and hashcode() methods now.
- Location of safari driver now configurable using “webdriver.safari.driver” system property.
- Basic support for using Docker containers with the new Grid Server.
- Selenium Grid will be robust as new Grid Server, supports “standalone”, “hub”, “node”, and completely distributed usage.
- HtmlUnitDriver will not be default part of Selenium WebDriver now.
- WebDriver implementation for Opera Browser is now removed :(Hence there won’t be OperaDriver class in the WebDriver API in Selenium 4).They removed it as Opera and Chrome are based on Chromium And the OperaDriver is a wrapper over ChromeDriver .They are suggesting the Opera users to test on Chrome Browser to some extent.
- Removed Support for PhantomJS Headless mode :They are suggesting to use Chrome and Firefox Browsers in headless mode instead .
- Added driver.switchTo().parentFrame() method to switch directly to the parent frame.
- All window manipulation methods are now supported .
- Replaced WebElement().getSize() and WebElement.getLocation() methods with a single method WebElement.getRect() .
- Removed timeouts() method in driver.manage() : Suggesting to use getTimeouts() and setTimeouts() methods instead.
- Added getRect(), setRect(), fullScreen() and minimize() methods in driver.manage().window()
- Removed getPosition(), setPosition(), getSize() and setSize() methods Suggesting to use getRect() and setRect() methods instead
For reference visit :
https://github.com/SeleniumHQ/selenium/blob/master/java/CHANGELOG
Categories: Selenium
thanks