A quick peek into the new release: Selenium 4.0.0

Good news to all those who have been waiting for this long on the official release of Selenium 4.0.0. Yes, it is finally released officially on Oct 13th of 2021. I think more than 2 years were spent by the experts to bring this new release, and I surely feel it's worth the wait.

I am sure multiple questions must be rolling around your head about this new release, let me address the most common ones here so that you no longer feel like a stranger to this new release. You can watch a quick peek into Selenium 4.0.0.

How to Upgrade or Start a new project with Selenium 4.0.0?

In order to create new selenium projects, you can use the following maven dependency, and if you want to upgrade an existing selenium project, it's very simple, just update the version to "4.0.0" in your pom.xml file for the selenium dependency.

Does it affect the existing code?

It is quite safe to upgrade to the latest version of selenium.

And finally What's new?

I would say that there are quite a significant number of new features introduced, here are some highlights

  • New APIs like driver.switchto().newWindow(params); - This allows us to work with multiple applications without creating multiple selenium webdriver objects. Learn how to use it with this example.
  • Automatic Handling of Basic and Digest Authentication - Register user name and password to the application which needs basic authentication, by this registering feature in selenium 4.0.0 it's taken care of automatically and the authentication popup will not appear. Learn how to use it with this example.
  • Relative Locators - One of the most challenging problems of Selenium is to write a stable XPath, it has been creating problems to many automation engineers, with this new feature of Relative Locators, one need not worry about how to create the best XPasths for complex situations. Learn how to use it with this example.
  • Access to Chrome DevTools - With this new feature in selenium, you can access the "dev tools" of the browser through code, there are many possibilities for this, In case you are an enthusiastic learner, following 2 examples can you give some light a) Access the Console Log Errors of the browser, b) Capture the performance metrics of a website.
  • Network Interception - With the help of selenium 4.0.0 API for network interception, you can intercept the traffic you are receiving from a website's response and manipulate or manage it as per your need. Learn how to hack your web application's response through this example.
  • Rebuilt Selenium Grid - It has been rebuilt to support executions in distribution mode, introduced the possibility of execution with Kubernetes, Revamped the UI for better usage

要查看或添加评论,请登录

Srinivas Potnuru的更多文章

社区洞察

其他会员也浏览了