{"id":24394,"library":"pyshadow","title":"PyShadow","description":"PyShadow is a Selenium plugin for managing Shadow DOM elements on web pages. It simplifies finding and interacting with elements inside shadow roots. Current version is 0.0.6, updated 3 years ago. Release cadence is low; the library appears to be in maintenance mode.","status":"active","version":"0.0.6","language":"python","source_language":"en","source_url":"https://github.com/sukgu/pyshadow","tags":["selenium","shadow-dom","web-scraping","automation"],"install":[{"cmd":"pip install pyshadow","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"PyShadow is a plugin for Selenium WebDriver.","package":"selenium","optional":false}],"imports":[{"note":"","wrong":null,"symbol":"Shadow","correct":"from pyshadow.main import Shadow"}],"quickstart":{"code":"from selenium import webdriver\nfrom pyshadow.main import Shadow\n\ndriver = webdriver.Chrome()\ndriver.get('https://example.com')\nshadow = Shadow(driver)\nelement = shadow.find_element(\"selector\")\nprint(element.text)\ndriver.quit()","lang":"python","description":"Initialize Shadow with a Selenium WebDriver instance, then use find_element or find_elements to locate elements inside shadow DOM."},"warnings":[{"fix":"Consider using Selenium's built-in shadow root access: driver.execute_script('return arguments[0].shadowRoot', element).find_element(...)","message":"PyShadow may not work correctly with newer Selenium 4+ because of changes in shadow DOM handling. Some users report that find_element fails when the shadow root is inside another shadow root.","severity":"gotcha","affected_versions":"pyshadow 0.0.6 with selenium >=4"},{"fix":"If encountering issues, switch to native Selenium shadow DOM support via WebElement.shadow_root (Selenium 4+).","message":"The library has not been updated for 3 years. It may not support modern browser versions or new Selenium releases.","severity":"deprecated","affected_versions":"all"},{"fix":"Always pass a string CSS selector: shadow.find_element('div.my-class').","message":"The find_element method expects a CSS selector string, but users often pass a non-string or a locator tuple.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.0.6':28 '3':30 'ago':32 'appear':39 'autom':52 'cadenc':34 'current':25 'dom':10,48 'element':11,21 'find':17 'insid':22 'interact':19 'librari':38 'low':36 'mainten':43 'manag':8 'mode':44 'page':14 'plugin':6 'pyshadow':1,2 'releas':33 'root':24 'scrape':51 'selenium':5,45 'shadow':9,23,47 'shadow-dom':46 'simplifi':16 'updat':29 'version':26 'web':13,50 'web-scrap':49 'year':31","created_at":"2026-05-01T08:12:51.428959+00:00","updated_at":"2026-05-01T08:12:51.428959+00:00","problems":[{"fix":"Upgrade to a patched version or use Selenium's native shadow DOM support: driver.execute_script('return document.querySelector(\"...\").shadowRoot')","cause":"PyShadow internally uses deprecated Selenium methods like find_element_by_css_selector that were removed in Selenium 4.3+.","error":"AttributeError: 'WebDriver' object has no attribute 'find_element_by_css_selector'"},{"fix":"Ensure the selector targets the correct element within the shadow tree. Try using browser DevTools to copy the exact CSS path for the element inside the shadow root.","cause":"The CSS selector provided does not match an element inside the shadow DOM, often because the shadow root nesting is deeper than expected.","error":"NoSuchElementException: Message: Unable to locate element: {...}"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.0.6","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/sukgu/pyshadow","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pyshadow/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}