Selenium Tutorials

Creating extent reports in selenium webdriver example

Extent Reports are the most popular reporting used with Selenium. As we all know, TestNG generates html reports by default but they are not more readable and interactive, we have to put lots of efforts to make it attractive. TestNG has provided an ability to implement 'IReporter' an interface to customize testng report by users.

Recommendations on Choosing the Locators in Selenium

Knowledge which helps to understand the importance of types of locators in Selenium – it’s the first and main step in the way of using such product “at maximum speeds”. And knowledge on their correct usage – it’s the main skill of working with this utility, as the rest knowledge in the process of interface with Selenium is just trivial selecting of necessary libraries and extensions and also using some backdoor ways.

Chrome Options for running WebDriver Tests

ChromeOptions class extends MutableCapabilities. We can use ChromeOptions class to manage options specific to ChromeDriver.

MutableCapabilities was introduced for the first time with Selenium v3.6.0 (Java Client). All the Option classes now extends MutableCapbilities. Refer the JavaDoc link for org.openqa.selenium.MutableCapabilities.

Selenium Grid Hub and Node configuration using JSON

Selenium Grid is used to speed up the execution by using multiple machines (multiple browsers with different versions, and browsers running on different operating systems) and run tests in parallel. And also to reduce the time spent for running the test suite after developers check-in their code.

Working with Shadow DOM Elements using Webdriver

When we try to find Shadow DOM elements using selenium locators, it will throw 'NoSuchElementException'. To access these Shadow DOM elements, we need to use JavascriptExecutor executeScript() function. If you look at the DOM structure, every element that has ShadowDOM also has a shadowRoot property which describes the underlying elements.