Giter VIP home page Giter VIP logo

shadowroot-digger-dotnet's Introduction

shadowroot-digger

DOM shadow root elements finder using Selenium solution in .NET.

shadowroot-digger (Build) codecov maintainer License: MIT NuGet

One of the important aspect of web components is encapsulation and Shadow DOM API is a key part of this, allowing hidden DOM trees to be attached to elements in the regular DOM tree. This shadow DOM tree starts with a shadow root, underneath which any elements can be attached, in the same way as the normal DOM. The solution combines the power of Document Query Selector API with Selenium to grab such shadow root DOM trees and interact with any elements encapsulated within it.

Selenium 4.1.x+ - Current supported package/solution version.
Selenium 4.0.x - Check support here.
Selenium 3 - Check support here.

Download

The package is available and can be downloaded using nuget.org package manager.

Features

  1. Returns shadow root or nested shadow root from DOM.
  2. Checks if shadow root or nested shadow root is present or not in the DOM.
    NOTE: Supports Selenium 3, 4.0.x & 4.1.x+ versions (Check Selenium Dependency Before Use)
          For Selenium 4.0.x - Use versions 2.x.x.
          For Selenium 3 - Use versions 1.x.x.

.NET Supported Versions

The solution is built on .NetStandard 2.0

Usage Guidelines

  1. Install the nuget package ShadowRoot.Digger.
  2. Use below extension methods to get shadow root or nested shadow root.
    Required parameters - webdriver instance & shadow root host selector identifier/s.
    ShadowRootAssist.GetShadowRootElement()
    ShadowRootAssist.GetNestedShadowRootElement()
    
    The returned shadow root element from above extension methods can be used to find element/s encapsulated within it.
    NOTE: Use jQuery Selectors or CSS Selectors for shadow root host identifications.
  3. Use below extension methods for checking if shadow root or nested shadow root exists or not.
    Required parameters - webdriver instance & shadow root host selector identifier/s.
    ShadowRootAssist.IsShadowRootElementPresent()
    ShadowRootAssist.IsNestedShadowRootElementPresent()
    
    NOTE: Use jQuery Selectors or CSS Selectors for shadow root host identifications.

Check the solution tests for more information.
NOTE: Google Chrome & shadow DOM in Chrome settings along with ShadowDOM.html have been used for testing the solution.

Verified Versions

Google Chrome Chrome Driver Microsoft Edge Edge Driver
114.0.5735.133 114.0.5735.90 114.0.1823.43 114.0.1823.43
113.0.5672.63 113.0.5672.63 113.0.1774.35 113.0.1774.35
112.0.5615.165 112.0.5615.49 112.0.1722.54 112.0.1722.54
111.0.5563.110 111.0.5563.64 111.0.1661.54 111.0.1661.54
110.0.5481.177 110.0.5481.77 110.0.1587.63 110.0.1587.63
109.0.5414.119 109.0.5414.74 109.0.1518.70 109.0.1518.70
108.0.5359.124 108.0.5359.71 108.0.1462.54 108.0.1462.54
107.0.5304.87 107.0.5304.62 107.0.1418.35 107.0.1418.35
106.0.5249.119 106.0.5249.61 106.0.1370.52 106.0.1370.52
105.0.5195.52 105.0.5195.19 105.0.1343.53 105.0.1343.53
104.0.5112.79 104.0.5112.79 104.0.1293.54 104.0.1293.47
103.0.5060.114 103.0.5060.53 103.0.1264.44 103.0.1264.45
102.0.5005.61 102.0.5005.61 102.0.1245.33 102.0.1245.33
101.0.4951.41 101.0.4951.41 101.0.1210.53 101.0.1210.53
100.0.4896.75 100.0.4896.60 100.0.1185.29 100.0.1185.29
99.0.4844.74 99.0.4844.51 99.0.1150.46 99.0.1150.46
98.0.4758.102 98.0.4758.102 98.0.1108.56 98.0.1108.56
97.0.4692.71 97.0.4692.71 97.0.1072.69 97.0.1072.69
96.0.4664.110 96.0.4664.45 96.0.1054.62 96.0.1054.62
95.0.4638.69 95.0.4638.54 95.0.1020.53 95.0.1020.53
94.0.4606.81 94.0.4606.61 94.0.992.23 94.0.992.23
93.0.4577.82 93.0.4577.63 93.0.961.27 93.0.961.27
92.0.4515.131 92.0.4515.107 92.0.902.45 92.0.902.45

shadowroot-digger-dotnet's People

Contributors

abhinavminhas avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.