Menu
WebdriverIOWebdriverIODocsAPIBlogContributeCommunity
v7
🌜
☀️
WebdriverIOWebdriverIO
  • Docs
  • API
  • Blog
  • Contribute
  • Community
  • v7
  • Introduction
  • Expect
  • Protocols
    • WebDriver Protocol
    • Appium
    • Mobile JSON Wire Protocol
    • Chromium
    • Sauce Labs
    • Selenium Standalone
    • JSON Wire Protocol
  • browser
    • $$
    • $
    • addCommand
    • call
    • custom$$
    • custom$
    • debug
    • deleteCookies
    • execute
    • executeAsync
    • getCookies
    • getPuppeteer
    • getWindowSize
    • keys
    • mock
    • newWindow
    • overwriteCommand
    • pause
    • react$$
    • react$
    • reloadSession
    • savePDF
    • saveRecordingScreen
    • saveScreenshot
    • setCookies
    • setTimeout
    • setWindowSize
    • switchWindow
    • throttle
    • touchAction
    • uploadFile
    • url
    • waitUntil
  • element
    • $$
    • $
    • addValue
    • clearValue
    • click
    • custom$$
    • custom$
    • doubleClick
    • dragAndDrop
    • getAttribute
    • getCSSProperty
    • getComputedLabel
    • getComputedRole
    • getHTML
    • getLocation
    • getProperty
    • getSize
    • getTagName
    • getText
    • getValue
    • isClickable
    • isDisplayed
    • isDisplayedInViewport
    • isEnabled
    • isEqual
    • isExisting
    • isFocused
    • isSelected
    • moveTo
    • nextElement
    • parentElement
    • previousElement
    • react$$
    • react$
    • saveScreenshot
    • scrollIntoView
    • selectByAttribute
    • selectByIndex
    • selectByVisibleText
    • setValue
    • shadow$$
    • shadow$
    • touchAction
    • waitForClickable
    • waitForDisplayed
    • waitForEnabled
    • waitForExist
    • waitUntil
  • mock
    • abort
    • abortOnce
    • clear
    • respond
    • respondOnce
    • restore

shadow$

Access an element inside a given element's shadowRoot

Usage#
$(selector).shadow$(selector)
Parameters#
NameTypeDetails
selectorString, Functionselector or JS Function to fetch a certain element
Example#
shadow$$.js
it('should return an element inside a shadowRoot', () => {
const innerEl = $('.input').shadow$('#innerEl');
console.log(innerEl.getValue()); // outputs: 'test123'
});
Edit this page
Previous
« shadow$$
Next
touchAction »

Docs

  • Getting Started
  • API Reference
  • Contribute
  • Help

Community

  • Stack Overflow
  • Support Chat
  • Slack
  • Twitter

More

  • Tidelift Subscription
  • Blog
  • GitHub
OpenJS Foundation Logo
Copyright © 2021 OpenJS Foundation