Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Web Components
  3. shadow-automation-selenium

shadow-automation-selenium

Apache-2.0Javav0.1.6

A Java Selenium plugin for automating multi-level Shadow DOM and custom HTML tags in web applications.

Visit WebsiteGitHubGitHub
116 stars36 forks0 contributors

What is shadow-automation-selenium?

Shadow Automation Selenium is a Java plugin that extends Selenium WebDriver to automate interactions with Shadow DOM elements and custom HTML tags. It solves the problem of Selenium's inability to access Shadow DOM, which is commonly used by modern frontend frameworks like Polymer for component encapsulation. The library provides methods to locate, wait for, and manipulate these otherwise inaccessible elements.

Target Audience

Java Selenium automation engineers and QA developers working on web applications that use Shadow DOM or custom HTML tags, particularly those built with Polymer or similar Web Components frameworks.

Value Proposition

Developers choose this plugin because it seamlessly integrates into existing Selenium projects, requires minimal code changes, and provides a comprehensive set of utilities for handling Shadow DOM without needing complex workarounds or switching automation tools.

Overview

This project focuses on automation of multi-level shadow root dom using java selenium. You can embed this plugin in your java selenium project.

Use Cases

Best For

  • Automating Polymer-based web applications with Shadow DOM
  • Testing custom HTML elements that Selenium cannot identify directly
  • Adding Shadow DOM support to existing Java Selenium frameworks
  • Writing PageFactory-based tests for Shadow DOM components
  • Handling nested Shadow DOM trees in multi-level component architectures
  • Synchronizing tests with implicit or explicit waits for Shadow DOM elements

Not Ideal For

  • Projects using Selenium in languages other than Java, unless adopting the separate Python library
  • Web applications without Shadow DOM or custom elements, as the library adds unnecessary complexity
  • Teams preferring Selenium 4's native Shadow DOM APIs to avoid third-party dependencies
  • Scenarios requiring extensive, up-to-date documentation or large community support

Pros & Cons

Pros

Shadow DOM Traversal

Directly penetrates nested Shadow DOM trees using CSS or XPath selectors, solving Selenium's key limitation with frameworks like Polymer, as demonstrated by methods like findElement for elements under shadow-root.

Custom Element Support

Handles custom HTML tags like <paper-tab> that Selenium cannot identify, enabling automation of modern web components without workarounds.

Seamless Integration

Drops into existing Java Selenium projects via Maven/Gradle and works with PageFactory using @FindElementBy annotation, minimizing code changes.

Comprehensive Utilities

Includes wait mechanisms, element checks (e.g., isVisible), and form interactions (selectDropdown), reducing the need for extra helper code in tests.

Cons

Java-Centric Limitation

Primarily for Java; Python support is via a separate project (pyshadow), which may lag in updates or features, fragmenting cross-language teams.

Selector Complexity

Requires mastering specific CSS and XPath rules for Shadow DOM, such as using double slashes in XPath, which can be error-prone and less intuitive than standard Selenium.

Version Dependency Risks

Tightly tied to Selenium versions (e.g., 0.1.6 requires Java 11 and Selenium 4.16.1), risking breaks with updates and limiting backward compatibility.

Frequently Asked Questions

Quick Stats

Stars116
Forks36
Contributors0
Open Issues4
Last commit5 months ago
CreatedSince 2019

Tags

#web-components#custom-elements#selenium-webdriver#integration-testing#polymer#selenium#java#selenium-java#web-automation#test-automation#shadow-dom#testing-tools#automation

Built With

S
Selenium
J
Java

Links & Resources

Website

Included in

Web Components3.5k
Auto-fetched 7 hours ago

Related Projects

query-selector-shadow-domquery-selector-shadow-dom

querySelector that can pierce Shadow DOM roots without knowing the path through nested shadow roots. Useful for automated testing of Web Components. Production use is not advised, this is for test environments/tools such as Web Driver, Playwright, Puppeteer

Stars262
Forks27
Last commit2 years ago
cypress-litcypress-lit

Test your Lit elements and native web components in cypress with all the modern browsers

Stars25
Forks2
Last commit3 days ago
capybara-shadowdomcapybara-shadowdom

Shadow DOM support for Capybara

Stars15
Forks1
Last commit3 years ago
W3C Webdriver conquering automation of Shadow DOMW3C Webdriver conquering automation of Shadow DOM

Shadow DOM tree and its interaction with the W3C Webdriver

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub