October 2021 Summaries
13 posts from Sauce Labs
Filter
Month:
Year:
Post Summaries
Back to Blog
Selenium 4 is a standards-based protocol using the W3C WebDriver standard for browser automation, ensuring future-proof support across all browsers. It introduces relative locators, new window and tab utilities, and features like printing pages as PDFs with Chrome and Firefox. The upcoming version also exposes new features with Firefox, modifies network conditions in Chromium-based browsers, and adds two new methods for getting element attributes or properties. Selenium Grid 4 has been rewritten from scratch, leveraging modern infrastructure such as Docker and distributed tracing. While some minor changes may be needed to existing tests, they will continue to run on Sauce Labs' platform if updated accordingly.
Oct 29, 2021
485 words in the original blog post.
Native mobile apps offer a premium user experience on both iOS and Android devices, but are more expensive due to high development and maintenance costs. Web mobile apps are cost-effective, easy to develop, and fast to deploy, but may have security gaps and limited functionality. Hybrid apps combine the benefits of native and web apps, but can be slower to deploy and require more maintenance. Progressive Web Apps (PWAs) provide an easier development process, no downloads required, and accessible on desktop and mobile devices, but may lack iOS support and push notifications. The choice of app type depends on business case, target user base, cost, time to market, user experience/performance, security, local device access, and discoverability. A customized testing approach is necessary for each type of app, considering factors such as functional testing, installation, visual UI testing, cellular data consumption, browser accessibility, responsiveness, connectivity issues, battery usage, offline experience, and accessibility.
Oct 28, 2021
1,520 words in the original blog post.
The new features of Selenium 4 for Firefox allow for easier installation and uninstallation of add-ons during a test session, taking full page screenshots, and updating browser preferences such as language. These changes can be useful for automating testing in Sauce Labs and adding more detailed information to bug reports.
Oct 20, 2021
570 words in the original blog post.
Selenium 4 introduces a new command to create either a new window or a new tab in automation scripts, allowing users to switch focus to the newly created element without relying on keyboard shortcuts that may vary between browsers. The `newWindow` and `newTab` commands can be used with different programming languages such as Java, Python, C#, Ruby, and JavaScript, providing a more reliable way to navigate through multiple windows or tabs in Selenium tests.
Oct 20, 2021
412 words in the original blog post.
The new Relative Locators in Selenium 4 allow developers to locate elements on a web page based on their visual placement relative to other elements. This approach enables more natural language descriptions of elements, making it easier to identify and interact with specific elements on the page. The available locators include `above`, `below`, `toLeftOf`, `toRightOf`, and `near`, which can be used to locate elements based on their position relative to other elements. This feature provides a more intuitive way of interacting with web pages, especially when dealing with complex layouts or dynamic content.
Oct 20, 2021
609 words in the original blog post.
Selenium Grid has been rewritten from scratch with modern infrastructure advantages such as Docker and distributed tracing. It allows users to run tests in parallel by distributing them across different hosts, specifying different operating systems and browsers. The new version provides a feature that enables relaying commands to a service that supports WebDriver, allowing users to access capabilities and see test results on Sauce Labs. To get started with Selenium Grid 4, users can follow the official documentation from the Selenium project or extend their local instance to access Sauce Labs capabilities. The best way to learn about the new features is by checking out the Appium Conference 2021 talk or following the blog post written by Selenium Project lead Simon Stewart.
Oct 20, 2021
439 words in the original blog post.
The Selenium project has introduced Bidirectional APIs in version 4, allowing developers to interact with the browser's DevTools Protocol. These APIs enable features such as intercepting network requests, mocking backends, performing basic authentication, and viewing console logs. The Selenium team is working with browser vendors to create a stable, cross-browser API using the bidirectional functionality. Currently, only Chrome, Edge, and Firefox support these new APIs, but other browsers like Safari will be supported when WebDriver BiDi is available. The Bidirectional APIs provide a range of activities such as checking console logs, intercepting network requests, performing basic authentication, inspecting elements in the DOM, executing bootstrap scripts to improve test execution time, mocking geolocation, throttling network performance, and simulating real-world conditions.
Oct 20, 2021
1,230 words in the original blog post.
To print a page as a PDF using Selenium 4, users can leverage the `print` method in combination with `PrintOptions`. The process involves loading a URL into a browser, setting up necessary capabilities and options for Firefox or Chrome, and then utilizing the `print` method to capture the page as a PDF. For Firefox, GeckoDriver 0.30.0 or higher is required, while for Chrome, headless mode must be enabled. The resulting PDF can be saved using Java's `Files.write` method. By using Selenium 4 with these capabilities and options, developers can efficiently create PDFs of web pages for testing and other purposes.
Oct 14, 2021
233 words in the original blog post.
In today's fast-paced software development landscape, the traditional 'either or' approach between speed and quality has given way to a new paradigm of simultaneous speed and quality. This shift is made possible by DevOps and continuous testing, which enable developers to increase both the velocity at which they release code and the quality of that code. By adopting a continuous testing model, companies can move quickly with digital confidence, empowering QA and product teams to work together to deliver an excellent customer experience. With the help of innovations in front-end testing and error monitoring, testers can now identify and fix issues simultaneously, resulting in stronger user experiences and more efficient software development processes.
Oct 14, 2021
484 words in the original blog post.
The Selenium team has upgraded to version 4 with several changes aimed at improving performance and reducing the need for custom functionalities in testing frameworks. The upgrade process is expected to be relatively painless, especially for users of officially supported languages (Ruby, JavaScript, C#, Python, and Java). However, some deprecated methods may cause issues, particularly if custom code has been built around them. Users are advised to check for updates on the Sauce Labs platform configurator, which provides more combinations and examples for upgrading dependencies and using new features. Key changes include removing support for legacy protocol, replacing capabilities with W3C WebDriver standard, and introducing changes in waits and timeouts. Potential issues that may arise during or after the upgrade process have been identified, along with suggested fixes to mitigate these problems.
Oct 12, 2021
1,621 words in the original blog post.
The Selenium 4 version introduces two new methods, getDomAttribute() and getDomProperty(), which provide more precise ways to retrieve an element's attribute or property values. These methods are recommended for performance and precision, especially when running tests on Sauce Labs, as they reduce the time it takes to execute commands by avoiding the need to send a large blob of JavaScript over the internet. The new methods have different implementations compared to the previous getAttribute() method, which was not accurate in retrieving attribute values. The article provides examples in Java to demonstrate when to use each method, highlighting cases where one returns false and the other returns null, and also showcases scenarios where the results update differently between the two methods.
Oct 12, 2021
431 words in the original blog post.
Setting Network Conditions with Chrome and EdgeSelenium 4 exposes a set of utilities to modify the network conditions in Chromium based browsers, like Google Chrome and Microsoft Edge. It is possible to modify the network by setting latency for the connection, altering upload or download throughput, or going offline. The Selenium 4 documentation provides examples in multiple languages for testing web applications under different network conditions.
Oct 12, 2021
223 words in the original blog post.
Selenium 4 has started its development in late 2018 and was released on October 13, 2021. The new release includes several features such as relative locators, better window and tab management, improved Selenium Grid, use of W3C by default under the hood, a set of bidirectional APIs designed for intercepting network requests, authentication on secure pages, listening to DOM events, and more. Selenium 4 is designed to be a drop-in replacement, but some tests or dependencies may need adjustments. Sauce Labs has contributed to its development, ensuring that tests will continue to work on their platform. The upgrade process to Selenium 4 is considered relatively painless, with some deprecated features to consider during the transition. The new release includes various new features such as relative locators, new window and tab utilities, printing pages as PDFs, network conditions setting, new element attribute and property methods, and bidirectional APIs.
Oct 12, 2021
630 words in the original blog post.