Skip to content
Sushil Kumar Gupta edited this page Jun 30, 2019 · 3 revisions

Shadow DOM

The shadow DOM is a web standard that developers use to encapsulate their HTML code and style components so that no other style components can override their code. It is a critically important piece of the web component story, as it ensures that a component will work in any environment, even if other CSS or JavaScript is at play on the page.

Custom HTML Tags

Custom elements provide a way for authors to build their own fully-featured DOM elements and these custom HTML tags can't be directly identified with Selenium tools.

Problem Statement

You have already developed your web-based automation framework in Java Selenium. Your front-end application uses Polymer, which uses a shadow DOM. Selenium doesn't provide any way to deal with shadow DOM elements. Your application page contains custom HTML tags that can't be identified directly using Selenium.

Solution

You can use this plugin by adding a .jar file or by including the dependency in your Java Selenium project.

See How to use this plugin