Selenium 4: Renewed. But Up to Par with AI Tools yet?

Blog
December 9, 2023

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 upgraded Selenium IDE recording & playback tool, besides being neatly polished, now comes available as an add-on for Firefox, Chrome and Edge, besides the SIDE runner for executing commands and Grid/Node projects. While and If conditionals allow for better control flow mechanism, helping testers write better scripts. Elements using a different locator strategy like ID, CSS & XPath can be selected via a backup element selector which falls back based on the recorded information. This provides more stability and reliability to tests. Code export for language bindings like Java, Python, .Net, Ruby and JavaScript is also supported on this upgrade.

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.

Routines like finding locators, defining mouse actions or managing multiple windows and tabs, are all done visually and on the fly while recording the Scenario.

In each created Test Scenario, Autify records and stores every locator over which the user executes actions, and, from this, Machine Learning algorithms will perform maintenance accordingly, analyzing test runs and stored elements to find out if changes have occurred and updating test cases as needed. But Autify, since it is versatile and flexible, also lets users manually specify locators via CSS or XPath selectors.

Actions like mouse-over, right-click or browsing to a new window are at the tip of the finger. The same goes for asserting visual elements on a page; assertions for page element text, page title, page URL, element existence or element states (such as checkboxes), values selected in a pull-down menu, and more, can be easily done with just a couple clicks.

Autify Test Plans offer a real smart set of browsers and devices which can be conveniently combined into execution environments suitable for the specific requirements of a give test plan. Autify counts with 4 selections run fully in the Cloud. Users can choose between Chrome/Linux, Edge/Windows Server, iPhone X/Mobile Emulator and Pixel 2/Mobile Emulator, finding a variety of mobile device emulation options.

Since Autify is a SaaS platform, served in the cloud, customers can forget about juggling with communication protocols and security policies. Autify Connect provides a smart and secure way of testing private applications, by establishing a secure tunnel between the client’s local machine and Autify so that Autify may access the client’s private apps under test. This enables Autify to run tests against private web apps which may not be directly accessible from the Internet – such as internal web systems, closed test environments or apps under development running on local computers.

Just like with manual locator finding using selectors as mentioned above, for users who want to have more control on things like testing user actions or asserting page elements, Autify provides JS Steps; a way in which the user can manually code JavaScript functions to be executed during the test run, expanding the reach and the richness of any test case.

Test execution statistics and reporting is another area in which Autify certainly knows how to deliver high quality useful insights.

The Usage Report feature provides comprehensive graphs that clearly display Autify usage within the workspace. Reviewing these graphs can help the team assess achievement in using Autify and communicate progress to management.

Of course, support is a highly important component of any software product which is considered of value.

Autify has an efficient support services, and a professional and human support team, dedicated to helping customers with their technical or commercial concerns. Via Autify Chat, customers can make all the desired questions and requests.

Besides that, the Autify Help Center counts with a rich, browsable and searchable information database in which users and customers can not only train themselves on learning to use Autify, but also evacuate the most technical doubts about how to manage the platform.

Conclusion

The customer is always right, goes the old saying, so the market is there, with everything it offers, for everyone to freely decide what is best for each. What would you choose in a world in which commerce and production grows at rocket speed? A world in which industry demands less complexity and better inclusiveness. A world in which technology may finally be at the service of humans and the other way around.

Autify stands for those principles, offering high quality software and professional support, closing the gap between top notch technology and non-tech people.

Start improving your development process with test automation. Sign up for a 14-day free trial or talk to our experts to learn more!

Run AI-Powered Test Automations Tailored to QA Teams with Autify!
Ditch your high cost manual work and start your no code FREE 14 day trial testing journey with Autify now!
Try Autify!
No credit card required. No auto-billing after trial.