Selenium 4 New Features
As many people related to QA testing might already know, Selenium launched its version 4.0 back ion October, 2021. Now, version 4.15 has some very interesting features that were added to the framework that are worth speaking about.
Since version 4.0, WebDriver has become fully compliant with the W3C recommendations, thus providing flexibility and simplifying the use of the API for browser automation, resulting in a more stable framework which reduces cross-browser complexities.
Relative Locators is one of the top features of Selenium, which lets the tester locate an element on a page through the use of a more natural language.
Simplifications in the Actions class like click, click and hold, right-click and release have been implemented to clarify coding.
Selenium Completion can rid the tester from remembering commands and provide tab completion by just running source <(selenium completion zsh) on a zsh console.
Open Telemetry framework, and the renewed UI placed over a GraphQL model, give users the power to create custom visualizations and monitor the Grid. Added to that, Selenium provides VNC previews to freely interact with and get deeper insight.
Since IPv6 support has been added, Grid communication using HTTPS protocol is possible.
Remote file download has been implemented for clients and Grid.
Selenium Manager is an innovation that helps run an environment in Selenium immediately. When no browser driver is detected or no third party driver manager is being used, it will configure browser drivers for Chrome, Firefox, and Edge when they are not defined on a PATH, by invoking them through Selenium bindings.
The new Grid 4 operates equally well as a single process on a single machine or in the customary “hub and node” arrangement. The new Standalone mode contains all functionalities to run a grid, automatically identifying drivers for Chrome and Firefox. The Distributed mode incorporates the already known four modes, Router, Distributor, Session and Node. Additionally, it enables full distribution mode and deployment for modern Kubernetes infrastructure and also includes support for Docker containers managed on local machines, ridding users from needing to set up VMs, making infrastructure maintenance less of a hassle.
The ability to manage multiple tabs and windows under the same session without the need to instantiate new driver objects is another remarkable feature in this Selenium version.
The new APIs give Selenium 4 native support for Chrome DevTools Protocol (CDP), enabling users to capture and monitor network traffic, simulate poor network conditions, perform geolocation and change device mode to do responsive design tests via methods from the new ChromiumDriver class.
Instead of Desired Capabilities, Grid now has Options for the five most popular browsers (Firefox, Chrome, Safari, Edge, IE).
Documentation has always been an issue with Selenium, given the fact that support and knowledge sharing is usually mediated through user forums. Now, Selenium 4 documentation has undergone a complete redesign, featuring a sleek user interface that enables effortless navigation to the desired page section. It comprehensively covers all information on tools and APIs within Selenium.
What can AI Tools Offer in Return?
It is hard to not be reiterative when when stressing about the fact that AI has come to simplify testing and liberate team members from the boredom of repetitive, complex tasks, which often also require more experienced staff. And precisely because not all members of a team might be experienced in programming or have knowledge about HTML/CSS, XPath/CSS selectors, DOM, JS, etc. –especially novices in the tech industry–, a different paradigm is needed to refresh the market and generate new opportunities.
Today, modern AI based, no-code tools simplify many –if not all– of the manual work which full-code tools and frameworks require.
Autify Truly Changes the Game
Autify absolutely frees the user from the need to deal with detecting browsers and configuring browser drivers or having to write instantiations of the Selenium Driver class; with Autify any tester can start creating a Scenario in seconds, by just specifying the URL of web app.