The wait is finally over, and the Selenium 4.0 Alpha release has been launched.
The wonderful comments from Simon Mavi Stewart about Selenium 4.0 alpha release as below:
After a wonderful @seleniumconf, I’ve finally found the time to ship the #java version of #selenium4 alpha. I’ve put together some quick docs on the new server jar here: https://t.co/WA4fVCxKq4 There’s still work to be done, but feedback is always welcome! 🙂
— Simon Mavi Stewart (@shs96c) April 24, 2019
The Selenium team has not yet announced it, but Selenium 4 Alpha is available to download at the MVN Repository. The below dependency should be added to pom.xml to get the alpha version.
From the word Alpha, we have come to know that there is a high chance it might not be stable enough. The current Selenium 4 is in an Alpha version, so it is not recommended to use for testing. We can start to use once it changes from Alpha to Beta.
Selenium 4 Alpha has undergone many significant changes, but it won’t impact your existing automation scripts.
Selenium 4.0 Alpha version Insights
- The W3C recommendation document for Selenium WebDriver is now available. Click here for more information, which provides a crystal clear picture of how Selenium API’s are working.
- Added driver.switchTo().parentFrame() method to switch directly to the parent frame.
- Add pollTimeout argument to the wait() method. The default value is 200ms.
- Replaced WebElement.getSize() and WebElement.getLocation() with a single method WebElement.getRect().
- Basic support for using Docker containers with the new Grid Server.
- Removed timeouts() method in driver.manage(). Suggest using getTimeouts() and setTimeouts() methods instead.
- WebDriver implementation for Opera Browser is now removed. They are suggesting Opera users 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.
- The Options class for every browser is now extending the Capabilities class.
Changes to Builder class |
|
Changes to chrome.Driver |
|
Changes to firefox.Driver |
|
Changes to firefox.Options |
|
Changes to lib/webdriver.WebElement |
|
Changes to lib/webdriver.Alert |
|
Changes to lib/webdriver.Options (driver.manage()) |
|
Changes to lib/webdriver.Window (driver.manage().window()) | Added
Removed (use the getRect/setRect methods)
|
There are a lot of new changes coming up. Let’s stay tuned for further official updates from the Selenium team.
Reference:
https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/CHANGES.md
https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-remote-driver/4.0.0-alpha-1
Very Good Blog.
Thanks Kalpana! Please stay tuned to our technical and business blogs on testing! If you would like us to write about something, do leave a note here and we will blog on it.