---
title: Target Element in Shadow Dom
description: "![Target Element in Shadow DOM](https://legacy.rtila.com/wp-content/uploads/edd/2024/10/Target-Element-in-Shadow-DOM.webp) **Definition:** Shadow DOM is a web standard that creates hidden, encapsulated DOM trees, preventing styles and content from being accessed or modified by external scripts, which can complicate web scraping efforts. **Description**: This command allows…"
url: "https://legacy.rtila.com/docs/target-element-in-shadow-dom/"
updated: "2025-01-05"
category: Custom Commands
---

# Target Element in Shadow Dom

![Target Element in Shadow DOM](https://legacy.rtila.com/wp-content/uploads/edd/2024/10/Target-Element-in-Shadow-DOM.webp)

   **Definition:**
Shadow DOM is a web standard that creates hidden, encapsulated DOM trees, preventing styles and content from being accessed or modified by external scripts, which can complicate web scraping efforts.

**Description**:
This command allows you to target and interact with an element even if it is hidden/contained within a Shadow DOM which usually makes that element not accessible to automation tools. With this command you will be able to Get/Read, Insert/Write, Click or Double Click that element and keep your automation flow going.

**Note**: This functionality is only supported when the Shadow DOM is in "**open**" mode.If the Shadow DOM is in "**closed**" mode, it will not be accessible to external automation tools or scripts due to the strict encapsulation of the DOM's structure.     ![](https://legacy.rtila.com/wp-content/uploads/2024/09/Shadow-Dom-Points.jpg)

## Explanations:

You will find below guidance as to what each configuration point allows you to do.

Point 1: Command name, you can rename it to better document your flow

Point 2: The element that hosts and contains the shadow DOM code

Point 3: The element within the shadow DOM that you target

Point 4: Text value to input in the shadow element (if applicable)

Point 5: The attribute of the target element you want (src, href etc.)

Point 6: The action you want to apply to the target element/attribute

    **This template scrapes the following data properties:**     Property          ****This template uses the following commands & functions:****     [Login Setup](https://legacy.rtila.com/docs/go-to-url-command/)[Populate Login](https://legacy.rtila.com/docs/populate-text-field-command/)[Click on Continue](https://legacy.rtila.com/docs/click-on-an-element-event/)[Populate Password](https://legacy.rtila.com/docs/populate-text-field-command/)    [Click on Submit Button](https://legacy.rtila.com/docs/click-on-an-element-event/)[Wait for Page to Load](https://legacy.rtila.com/docs/wait-commands-2/#wait-time)[Click People Directory](https://legacy.rtila.com/docs/click-on-an-element-event/)[Click on Cards](https://legacy.rtila.com/docs/click-on-an-element-event/)    [Wait Time](https://legacy.rtila.com/docs/wait-commands-2/#wait-time)[Populate Comment](https://legacy.rtila.com/docs/populate-text-field-command/)[Click on Send Arrow Comment](https://legacy.rtila.com/docs/click-on-an-element-event/)[Press Escape](https://legacy.rtila.com/docs/press-a-keyboard-key-command/)      ****Watch Video Demo**** :  [![](https://legacy.rtila.com/wp-content/uploads/2024/09/Target-Element-in-Shadow-DOM-3.jpg)](https://www.youtube.com/watch?v=iOcgw6C3-aI)
